From 84834f46a1e27130b0397880d2e1c834d7e7a8c3 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Thu, 2 Dec 2021 16:17:24 +0100 Subject: [PATCH] make TEMPDIR and FWDIR overridable, create FWDIR if necessary --- pull-roms.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 -