Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
DougieLawson opened this issue Jan 26, 2021 · 5 comments · May be fixed by #11 or #20
Open

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

DougieLawson opened this issue Jan 26, 2021 · 5 comments · May be fixed by #11 or #20

Comments

@DougieLawson
Copy link

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
Copy link

aallan commented Jan 26, 2021

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

@ghollingworth
Copy link

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
Copy link
Contributor

lurch commented Jan 26, 2021

#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 🙂

ndabas added a commit to ndabas/pico-setup that referenced this issue Feb 2, 2021
If the script fails on the first try, and is re-run later, it fails for two reasons:
- The `mkdir build` commands fail
- The `git clone` for `picoprobe` and `picotool` fail because those repos have already been cloned.

This PR fixes these issues. This will also supersede/obsolete raspberrypi#6 and fix raspberrypi#10.
@ndabas ndabas linked a pull request Feb 2, 2021 that will close this issue
@ndabas
Copy link

ndabas commented Feb 4, 2021

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

@aallan
Copy link

aallan commented Feb 4, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants