Skip to content

Commit e93f260

Browse files
authored
MacOS CI failure fix (#1280)
1 parent feff7ef commit e93f260

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

build.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,15 @@ echo "macosx deployment target="$MACOSX_DEPLOYMENT_TARGET
9999
# Install build tools and recent sqlite3
100100
FILE=.buildtools
101101
OS_NAME=`uname -a`
102+
102103
if [ ! -f $FILE ]; then
103104
case "$OS_NAME" in
104-
*Darwin*) tools/setup-buildtools-apple.sh $MAC_ARCH ;;
105-
*Linux*) [[ -z "$NOROOT" ]] && sudo tools/setup-buildtools.sh || echo "No root: skipping build tools installation." ;;
106-
*) echo "WARNING: unsupported OS $OS_NAME , skipping build tools installation.."
105+
*Darwin*) CMD="tools/setup-buildtools-apple.sh $MAC_ARCH" ;;
106+
*Linux*) CMD="tools/setup-buildtools.sh" ;;
107+
*) CMD=""; echo "WARNING: unsupported OS $OS_NAME, skipping build tools installation.." ;;
107108
esac
108-
# Assume that the build tools have been successfully installed
109+
110+
[[ -n "$CMD" ]] && { [[ -z "$NOROOT" ]] && sudo $CMD || echo "No root: skipping build tools installation."; }
109111
echo > $FILE
110112
fi
111113

0 commit comments

Comments
 (0)