make TEMPDIR and FWDIR overridable, create FWDIR if necessary

This commit is contained in:
Gwenhael Le Moine 2021-12-02 16:17:24 +01:00
parent 9360642a0f
commit 84834f46a1
No known key found for this signature in database
GPG key ID: FDFE3669426707A7

View file

@ -1,13 +1,14 @@
TEMPDIR=$(pwd)/tmpdir
FWDIR=$(pwd)/firmware
TEMPDIR=${TEMPDIR:-$(pwd)/tmpdir}
FWDIR=${FWDIR:-$(pwd)/firmware}
mkdir -p $FWDIR
echo Retrieving Bootloader from hpcalc.org for HP 49g+ and HP 50g...
mkdir -p $TEMPDIR
pushd $TEMPDIR
wget https://www.hpcalc.org/hp49/pc/rom/hp-arm-models-bootloader.zip
unzip -j hp-arm-models-bootloader.zip -d $TEMPDIR
cp *.bin $FWDIR
cp *.bin $FWDIR/
popd
rm -rf $TEMPDIR
@ -17,7 +18,7 @@ mkdir -p $TEMPDIR
pushd $TEMPDIR
wget https://www.hpcalc.org/hp49/pc/rom/hp4950v215.zip
unzip -j hp4950v215.zip -d $TEMPDIR
cp *.bin $FWDIR
cp *.bin $FWDIR/
popd
rm -rf $TEMPDIR
@ -25,7 +26,6 @@ echo Retrieving latest Unofficial newRPL build...
mkdir -p $TEMPDIR
pushd $TEMPDIR
wget https://hpgcc3.org/downloads/newrplfw.bin
cp newrplfw.bin $FWDIR
cp newrplfw.bin $FWDIR/
popd
rm -rf $TEMPDIR