Skip to content

Commit 127c935

Browse files
authored
Refactor BUILDROOT_ABS initialization to provide a default path (#991)
1 parent eab1059 commit 127c935

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/globals/scripts/zig-cc.sh

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
#!/usr/bin/env bash
22

3-
if [ "$BUILD_ROOT_PATH" = "" ]; then
4-
echo "The script must be run in the SPC build environment."
5-
exit 1
6-
fi
7-
83
SCRIPT_DIR="$(dirname "${BASH_SOURCE[0]}")"
9-
BUILDROOT_ABS=$BUILD_ROOT_PATH
4+
BUILDROOT_ABS="${BUILD_ROOT_PATH:-$(realpath "$SCRIPT_DIR/../../../buildroot/include" 2>/dev/null || true)}"
105
PARSED_ARGS=()
116

127
while [[ $# -gt 0 ]]; do

0 commit comments

Comments
 (0)