Skip to content

Commit 124315d

Browse files
committed
Fixed paths with spaced bug.
1 parent 9aea754 commit 124315d

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

entrypoint.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ set -e
2222
DEFAULT_IGNORED_BUILD_DIRS=("CMakeFiles" "elf2uf2" "pico-sdk" "pioasm")
2323

2424
# Get arguments
25-
SOURCE_DIR=$1
26-
OUTPUT_DIR=$2
27-
OUTPUT_EXT=$3
28-
BOARD_NAME=$4
29-
CMAKE_ARGS=$5
30-
OUTPUT_IGNORED_DIRS=$6
25+
SOURCE_DIR="$1"
26+
OUTPUT_DIR="$2"
27+
OUTPUT_EXT="$3"
28+
BOARD_NAME="$4"
29+
CMAKE_ARGS="$5"
30+
OUTPUT_IGNORED_DIRS="$6"
3131

3232
# Split output extensions and into array
3333
IFS=" " read -r -a BINARY_EXTENSIONS <<< "$OUTPUT_EXT"
@@ -77,8 +77,8 @@ echo "IGNORED_BUILD_DIRS=${IGNORED_BUILD_DIRS[@]}"
7777

7878
# Build the project
7979
echo "Building the project..."
80-
mkdir $OUTPUT_DIR && cd $OUTPUT_DIR
81-
cmake -DPICO_BOARD=$BOARD_NAME $CMAKE_ARGS $SOURCE_DIR
80+
mkdir "$OUTPUT_DIR" && cd "$OUTPUT_DIR"
81+
cmake -DPICO_BOARD="$BOARD_NAME" $CMAKE_ARGS "$SOURCE_DIR"
8282
make -j$(nproc)
8383

8484
# Remove ignored build directories
@@ -104,11 +104,11 @@ done
104104

105105
# Clear the build directory
106106
echo "Clearing the build directory..."
107-
rm -rf $OUTPUT_DIR && mkdir $OUTPUT_DIR
107+
rm -rf "$OUTPUT_DIR" && mkdir "$OUTPUT_DIR"
108108

109109
# Move the build artifacts back to the output directory
110110
echo "Moving build artifacts back to the output directory..."
111-
mv /tmp/make_build/* $OUTPUT_DIR
111+
mv /tmp/make_build/* "$OUTPUT_DIR"
112112

113113
# Add output directory path to GITHUB_OUTPUT
114114
echo "output_dir=$OUTPUT_DIR_RELATIVE" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)