aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrubo77 <github@r.z11.de>2018-07-21 06:09:14 +0200
committerrubo77 <github@r.z11.de>2018-07-21 06:26:58 +0200
commitc82493ea4f589f2d430e731de65c0d50b27b1e5c (patch)
tree938fa56ddbbe3a8e436660626e70366c8b1aba1c
parent83d0c018531403e14b3af745da8c86d9a4bf9e94 (diff)
finish add firmware indexer script
-rwxr-xr-xdownload/upgrade-downloadpage.sh15
1 files changed, 9 insertions, 6 deletions
diff --git a/download/upgrade-downloadpage.sh b/download/upgrade-downloadpage.sh
index b9aba2d..b75784b 100755
--- a/download/upgrade-downloadpage.sh
+++ b/download/upgrade-downloadpage.sh
@@ -1,22 +1,25 @@
#!/bin/bash
-# set the new release-candidate version here
-CUR=2018.1~exp-215
+# set the new version here
+CUR=2018.1~ngly-234
+BRANCH='nightly'
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-<VERSION>|/release-candidate/sysupgrade/gluon-ffki-'$CUR'|g' $OUT_FILE
-sed -i 's|/.*/factory/gluon-ffki-<VERSION>|/release-candidate/factory/gluon-ffki-'$CUR'|g' $OUT_FILE
+sed -i 's|/sysupgrade/gluon-ffki-<VERSION>|/sysupgrade/gluon-ffki-'$CUR'|g' $OUT_FILE
+sed -i 's|/factory/gluon-ffki-<VERSION>|/factory/gluon-ffki-'$CUR'|g' $OUT_FILE
+sed -i 's|release-candidate|'$BRANCH'/'$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</a><deadlink none="'
+INVALID='">n/a </a><deadlink none="'
while IFS= read -r URL; do
if wget --no-check-certificate --spider "$URL" 2>/dev/null; then
echo -n .
else
echo
echo "$URL does not exist"
- sed -i 's|'$URL'|'$URL''$INVALID'|g' $OUT_FILE
+ 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"
+sed -i 's|http://|//|g' $OUT_FILE