Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions pico_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ GITHUB_PREFIX="https://github.com/raspberrypi/"
GITHUB_SUFFIX=".git"
SDK_BRANCH="master"

# Add blank line to ~/.profile before adding our path-vars
echo "" >> ~/.profile

for REPO in sdk examples extras playground
do
DEST="$OUTDIR/pico-$REPO"
Expand All @@ -68,18 +71,16 @@ do
git submodule update --init
cd $OUTDIR

# Define PICO_SDK_PATH in ~/.bashrc
# Define PICO_XXXX_PATH in ~/.profile
VARNAME="PICO_${REPO^^}_PATH"
echo "Adding $VARNAME to ~/.bashrc"
echo "export $VARNAME=$DEST" >> ~/.bashrc
echo "Adding $VARNAME to ~/.profile"
echo "export $VARNAME=$DEST" >> ~/.profile
export ${VARNAME}=$DEST
fi
done

cd $OUTDIR

# Pick up new variables we just defined
source ~/.bashrc

# Build a couple of examples
cd "$OUTDIR/pico-examples"
Expand Down