-
Notifications
You must be signed in to change notification settings - Fork 47
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
Fix spaces in parent folder name #18
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ else | |
fi | ||
|
||
# Number of cores when running make | ||
JNUM=4 | ||
JNUM=$(cat /proc/cpuinfo | grep processor | wc -l) | ||
|
||
# Where will the output go? | ||
OUTDIR="$(pwd)/pico" | ||
|
@@ -44,8 +44,8 @@ sudo apt install -y $DEPS | |
|
||
echo "Creating $OUTDIR" | ||
# Create pico directory to put everything in | ||
mkdir -p $OUTDIR | ||
cd $OUTDIR | ||
mkdir -p "$OUTDIR" | ||
cd "$OUTDIR" | ||
|
||
# Clone sw repos | ||
GITHUB_PREFIX="https://github.com/raspberrypi/" | ||
|
@@ -56,27 +56,27 @@ for REPO in sdk examples extras playground | |
do | ||
DEST="$OUTDIR/pico-$REPO" | ||
|
||
if [ -d $DEST ]; then | ||
if [ -d "$DEST" ]; then | ||
echo "$DEST already exists so skipping" | ||
else | ||
REPO_URL="${GITHUB_PREFIX}pico-${REPO}${GITHUB_SUFFIX}" | ||
echo "Cloning $REPO_URL" | ||
git clone -b $SDK_BRANCH $REPO_URL | ||
|
||
# Any submodules | ||
cd $DEST | ||
cd "$DEST" | ||
git submodule update --init | ||
cd $OUTDIR | ||
cd "$OUTDIR" | ||
|
||
# Define PICO_SDK_PATH in ~/.bashrc | ||
VARNAME="PICO_${REPO^^}_PATH" | ||
echo "Adding $VARNAME to ~/.bashrc" | ||
echo "export $VARNAME=$DEST" >> ~/.bashrc | ||
export ${VARNAME}=$DEST | ||
echo "export $VARNAME=\"$DEST\"" >> ~/.bashrc | ||
export ${VARNAME}="$DEST" | ||
fi | ||
done | ||
|
||
cd $OUTDIR | ||
cd "$OUTDIR" | ||
|
||
# Pick up new variables we just defined | ||
source ~/.bashrc | ||
|
@@ -90,12 +90,12 @@ cmake ../ -DCMAKE_BUILD_TYPE=Debug | |
for e in blink hello_world | ||
do | ||
echo "Building $e" | ||
cd $e | ||
cd "$e" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Technically not needed here, as neither There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd be inclined to keep the quotes everywhere they may be needed, to make it future proof/consistent There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed, that's why I said "(but I guess it doesn't hurt)" |
||
make -j$JNUM | ||
cd .. | ||
done | ||
|
||
cd $OUTDIR | ||
cd "$OUTDIR" | ||
|
||
# Picoprobe and picotool | ||
for REPO in picoprobe picotool | ||
|
@@ -105,7 +105,7 @@ do | |
git clone $REPO_URL | ||
|
||
# Build both | ||
cd $DEST | ||
cd "$DEST" | ||
mkdir build | ||
cd build | ||
cmake ../ | ||
|
@@ -116,7 +116,7 @@ do | |
sudo cp picotool /usr/local/bin/ | ||
fi | ||
|
||
cd $OUTDIR | ||
cd "$OUTDIR" | ||
done | ||
|
||
if [ -d openocd ]; then | ||
|
@@ -129,7 +129,7 @@ if [[ "$SKIP_OPENOCD" == 1 ]]; then | |
else | ||
# Build OpenOCD | ||
echo "Building OpenOCD" | ||
cd $OUTDIR | ||
cd "$OUTDIR" | ||
# Should we include picoprobe support (which is a Pico acting as a debugger for another Pico) | ||
INCLUDE_PICOPROBE=1 | ||
OPENOCD_BRANCH="rp2040" | ||
|
@@ -147,7 +147,7 @@ else | |
sudo make install | ||
fi | ||
|
||
cd $OUTDIR | ||
cd "$OUTDIR" | ||
|
||
# Liam needed to install these to get it working | ||
EXTRA_VSCODE_DEPS="libx11-xcb1 libxcb-dri3-0 libdrm2 libgbm1 libegl-mesa0" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make this change in a separate PR, as it's unrelated the the spaces-in-path issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh.. Apologies I missed that. Will do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you removed this, but then added it back again??
You might find things easier to manage if you do them on separate branches, rather than doing everything on
protik09:master
🙂There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping @protik09 again. Can you please update this PR to remove this change?