From 708fb5979da91615c6fcdea82b3e4c4536f13173 Mon Sep 17 00:00:00 2001 From: rubo77 Date: Fri, 20 Jul 2018 01:58:43 +0200 Subject: add firmware indexer script --- download/upgrade-downloadpage.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 download/upgrade-downloadpage.sh (limited to 'download') diff --git a/download/upgrade-downloadpage.sh b/download/upgrade-downloadpage.sh new file mode 100755 index 0000000..b9aba2d --- /dev/null +++ b/download/upgrade-downloadpage.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# set the new release-candidate version here +CUR=2018.1~exp-215 +OUT_FILE=index.html +wget -k --no-check-certificate http://freifunk.in-kiel.de/firmware-rc.html -O $OUT_FILE +# replace the data from the template +sed -i 's|/.*/sysupgrade/gluon-ffki-|/release-candidate/sysupgrade/gluon-ffki-'$CUR'|g' $OUT_FILE +sed -i 's|/.*/factory/gluon-ffki-|/release-candidate/factory/gluon-ffki-'$CUR'|g' $OUT_FILE +echo -n "dead link check " +#sed -i "s/tube2/nixtube2/g" $OUT_FILE # for debug to create a dead link +INVALID='">n/a/dev/null; then + echo -n . + else + echo + echo "$URL does not exist" + sed -i 's|'$URL'|'$URL''$INVALID'|g' $OUT_FILE + fi +#done < <(grep -Po '(?<=href=")[^"]*' $OUT_FILE|grep gluon|grep alfa) # for debug +done < <(grep -Po '(?<=href=")[^"]*' $OUT_FILE|grep gluon) +echo "dead link check done" -- cgit v1.2.3