Skip to content

Commit

Permalink
use sudo for macos
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitb committed May 29, 2024
1 parent feff7ef commit d64d055
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,12 @@ FILE=.buildtools
OS_NAME=`uname -a`
if [ ! -f $FILE ]; then
case "$OS_NAME" in
*Darwin*) tools/setup-buildtools-apple.sh $MAC_ARCH ;;
*Linux*) [[ -z "$NOROOT" ]] && sudo tools/setup-buildtools.sh || echo "No root: skipping build tools installation." ;;
*) echo "WARNING: unsupported OS $OS_NAME , skipping build tools installation.."
*Darwin*) CMD="tools/setup-buildtools-apple.sh $MAC_ARCH" ;;
*Linux*) CMD="tools/setup-buildtools.sh" ;;
*) echo "WARNING: unsupported OS $OS_NAME, skipping build tools installation.." && exit 1 ;;
esac
# Assume that the build tools have been successfully installed

[[ -z "$NOROOT" ]] && sudo $CMD || $CMD
echo > $FILE
fi

Expand Down

0 comments on commit d64d055

Please sign in to comment.