raspberrypi / pico-setup

92 stars 42 forks source link

If pico_setup.sh fails during install it can't be re-run #10

Open DougieLawson opened 3 years ago

DougieLawson commented 3 years ago

If you get any failure attempting to run pico-setup.sh then that script can't be rerun.

It barfs on

# Build a couple of examples
cd "$OUTDIR/pico-examples"
mkdir build
cd build

The quick hack to get round that is

# Build a couple of examples
cd "$OUTDIR/pico-examples"
#mkdir build
cd build

but it really should include code to allow a sane re-run.

aallan commented 3 years ago

Happy to accept a PR that checks for the directory before trying to create it.

ghollingworth commented 3 years ago

It should just be replacing mkdir with mkdir -p which will make directories 'as necessary' and since it doesn't need to doesn't bother!

lurch commented 3 years ago

6 already fixes a similar problem that was spotted by somebody on the forums, but I didn't think to test it myself to see if there were any other failure-points! I'll do that today :slightly_smiling_face:

ndabas commented 3 years ago

@aallan I've submitted a PR to fix this, see #11.

aallan commented 3 years ago

Many thanks! The maintainer will take a look soon as he has a chance.