diff --git a/pull-roms.sh b/pull-roms.sh index b3cce65..ff3e65a 100755 --- a/pull-roms.sh +++ b/pull-roms.sh @@ -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 -