diff options
author | rubo77 <github@r.z11.de> | 2018-07-21 06:09:14 +0200 |
---|---|---|
committer | rubo77 <github@r.z11.de> | 2018-07-21 06:26:58 +0200 |
commit | c82493ea4f589f2d430e731de65c0d50b27b1e5c (patch) | |
tree | 938fa56ddbbe3a8e436660626e70366c8b1aba1c /download | |
parent | 83d0c018531403e14b3af745da8c86d9a4bf9e94 (diff) |
finish add firmware indexer script
Diffstat (limited to 'download')
-rwxr-xr-x | download/upgrade-downloadpage.sh | 15 |
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 |