Skip to content

Commit ba0bfdf

Browse files
committed
scripts/sketch_utils.sh: Move the logic that gets the build dir after
the part that retrieves the arguments. Signed-off-by: Abdelatif Guettouche <[email protected]>
1 parent dac61ca commit ba0bfdf

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/scripts/sketch_utils.sh

+9-6
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,22 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <fqbn> <path-to-i
77
return 1
88
fi
99

10-
ARDUINO_CACHE_DIR="$HOME/.arduino/cache.tmp"
11-
if [ -z "$ARDUINO_BUILD_DIR" ]; then
12-
build_dir="$(dirname $sketch)/build"
13-
else
14-
build_dir="$ARDUINO_BUILD_DIR"
15-
fi
1610
local ide_path=$1
1711
local usr_path=$2
1812
local fqbn=$3
1913
local sketch=$4
2014
local xtra_opts=$5
2115
local win_opts=$6
2216

17+
ARDUINO_CACHE_DIR="$HOME/.arduino/cache.tmp"
18+
if [ -z "$ARDUINO_BUILD_DIR" ]; then
19+
build_dir="$(dirname $sketch)/build"
20+
else
21+
build_dir="$ARDUINO_BUILD_DIR"
22+
fi
23+
24+
echo $sketch
25+
2326
rm -rf "$build_dir"
2427
mkdir -p "$build_dir"
2528
mkdir -p "$ARDUINO_CACHE_DIR"

0 commit comments

Comments
 (0)