@@ -22,12 +22,12 @@ set -e
22
22
DEFAULT_IGNORED_BUILD_DIRS=(" CMakeFiles" " elf2uf2" " pico-sdk" " pioasm" )
23
23
24
24
# 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 "
31
31
32
32
# Split output extensions and into array
33
33
IFS=" " read -r -a BINARY_EXTENSIONS <<< " $OUTPUT_EXT"
@@ -77,8 +77,8 @@ echo "IGNORED_BUILD_DIRS=${IGNORED_BUILD_DIRS[@]}"
77
77
78
78
# Build the project
79
79
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 "
82
82
make -j$( nproc)
83
83
84
84
# Remove ignored build directories
@@ -104,11 +104,11 @@ done
104
104
105
105
# Clear the build directory
106
106
echo " Clearing the build directory..."
107
- rm -rf $OUTPUT_DIR && mkdir $OUTPUT_DIR
107
+ rm -rf " $OUTPUT_DIR " && mkdir " $OUTPUT_DIR "
108
108
109
109
# Move the build artifacts back to the output directory
110
110
echo " Moving build artifacts back to the output directory..."
111
- mv /tmp/make_build/* $OUTPUT_DIR
111
+ mv /tmp/make_build/* " $OUTPUT_DIR "
112
112
113
113
# Add output directory path to GITHUB_OUTPUT
114
114
echo " output_dir=$OUTPUT_DIR_RELATIVE " >> $GITHUB_OUTPUT
0 commit comments