Browse Source

add draft version of 'check-public.sh'

This script downloads the current stable firmware images for
Freifunk Paderborn and invokes check.sh for it in order to
verify the integrity of the published images.
Helge Jung 9 years ago
parent
commit
b08c0d8d87
1 changed files with 21 additions and 0 deletions
  1. 21 0
      check-public.sh

+ 21 - 0
check-public.sh

@@ -0,0 +1,21 @@
+#!/bin/bash
+
+MYDIR=$(dirname $0)
+MYDIR=$(readlink -f $MYDIR)
+. "${MYDIR}/functions.sh"
+
+TEMPDIR=$(mktemp -d)
+pushd "$TEMPDIR" > /dev/null
+
+wget http://firmware.paderborn.freifunk.net/stable/build_info.txt -o "${MYDIR}/versions/stable"
+wget http://firmware.paderborn.freifunk.net/stable/images.7z || abort "Failed to download 'images.7z'."
+
+7z e images.7z || abort "Failed to extract firmware."
+
+popd > /dev/null
+pushd "$MYDIR" > /dev/null
+
+CANDIDATE="$TEMPDIR" ./check.sh
+
+popd > /dev/null
+