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.