Browse Source

fix(osx): create /usr/local/sbin directory for brew package installation

ffmpeg dependency unbound attempts to symlink to /usr/local/sbin, failing if
the directory does not exist. /usr/local/sbin does not exist by default on
10.13 High Sierra, so prompt to create it if it doesn't exit, and create it for
travis CI automatically.
reviewable/pr5866/r2
Anthony Bilinski 6 years ago
parent
commit
e97b270584
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
  1. 20
      osx/qTox-Mac-Deployer-ULTIMATE.sh

20
osx/qTox-Mac-Deployer-ULTIMATE.sh

@ -92,6 +92,26 @@ install() {
read -n1 -rsp $'Press any key to continue or Ctrl+C to exit...\n' read -n1 -rsp $'Press any key to continue or Ctrl+C to exit...\n'
fi fi
# osx 10.13 High Sierra doesn't come with a /usr/local/sbin, yet it is needed by some brew packages
NEEDED_DEP_DIR="/usr/local/sbin"
if [[ $TRAVIS = true ]]
then
sudo mkdir -p $NEEDED_DEP_DIR
sudo chown -R $(whoami) $NEEDED_DEP_DIR
elif [[ ! -d $NEEDED_DEP_DIR ]]
then
fcho "The direcory $NEEDED_DEP_DIR must exist for some development packages."
read -r -p "Would you like to create it now, and set the owner to $(whoami)? [y/N] " response
if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]
then
sudo mkdir $NEEDED_DEP_DIR
sudo chown -R $(whoami) $NEEDED_DEP_DIR
else
fcho "Cannot proceed without $NEEDED_DEP_DIR. Exiting."
exit 0
fi
fi
#fcho "Installing x-code Command line tools ..." #fcho "Installing x-code Command line tools ..."
#xcode-select --install #xcode-select --install

Loading…
Cancel
Save