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
14 changes: 12 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,16 @@ normalize_path() {

same_dir() {
[ -d "$1" ] && [ -d "$2" ] || return 1
stat1=$(stat -c "%d:%i" "$1")
stat2=$(stat -c "%d:%i" "$2")
# Use -f for macOS, -c for Linux
if stat -f "%d:%i" "$1" >/dev/null 2>&1; then
# macOS
stat1=$(stat -f "%d:%i" "$1")
stat2=$(stat -f "%d:%i" "$2")
else
# Linux
stat1=$(stat -c "%d:%i" "$1")
stat2=$(stat -c "%d:%i" "$2")
fi
[ "$stat1" = "$stat2" ]
}

Expand Down Expand Up @@ -289,6 +297,8 @@ fi
# PC BUILD using cmake
if [ ! -z "$PC_TARGET" ] ; then
echo "PC Build Mode"
# Convert PC_TARGET to uppercase for CMake compatibility
PC_TARGET="${PC_TARGET^^}"
# lets build_webui.py know we are using the generated INI file, this variable name is the one PIO uses when it calls subprocesses, so we use same name.
export PROJECT_CONFIG=$INI_FILE
GEN_CMD=""
Expand Down
Loading