(#7) Redownload the Firefox tarballs if truncated, rather than profiling with corrupt data

This commit is contained in:
Alcaro
2018-04-17 22:25:07 +02:00
parent be15155a66
commit a4274bf35a
2 changed files with 18 additions and 4 deletions

View File

@@ -43,6 +43,11 @@ if [ ! -e profile/choice ]; then
done
fi
#if download was aborted, resume it
if [ -e profile/firefox-45.0esr.tar ]; then
profile/download.sh
fi
#clean up
rm flips flips.exe floating.zip obj/*

View File

@@ -1,8 +1,17 @@
#!/bin/sh
FX45=https://ftp.mozilla.org/pub/firefox/releases/45.0esr/linux-x86_64/en-US/firefox-45.0esr.tar.bz2
FX52=https://ftp.mozilla.org/pub/firefox/releases/52.0esr/linux-x86_64/en-US/firefox-52.0esr.tar.bz2
SRC=profile/firefox-45.0esr.tar
DST=profile/firefox-52.0esr.tar
SRCSIZE=101529600
DSTSIZE=113336320
SRCURL=https://ftp.mozilla.org/pub/firefox/releases/45.0esr/linux-x86_64/en-US/firefox-45.0esr.tar.bz2
DSTURL=https://ftp.mozilla.org/pub/firefox/releases/52.0esr/linux-x86_64/en-US/firefox-52.0esr.tar.bz2
if [ ! -f $SRC ] || [ $(wc -c <$SRC) -lt $SRCSIZE ]; then
wget $SRCURL -O- | bzcat > $SRC || exit $?
fi
if [ ! -f $DST ] || [ $(wc -c <$DST) -lt $DSTSIZE ]; then
wget $DSTURL -O- | bzcat > $DST || exit $?
fi
wget $FX45 -O- | bzcat > profile/firefox-45.0esr.tar || exit $?
wget $FX52 -O- | bzcat > profile/firefox-52.0esr.tar || exit $?
echo y > profile/choice