Skip to content

Commit

Permalink
fix(osx): create /usr/local/sbin directory for brew package installation
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
anthonybilinski committed Oct 10, 2019
1 parent 8e597ed commit e97b270
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions osx/qTox-Mac-Deployer-ULTIMATE.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,26 @@ install() {
read -n1 -rsp $'Press any key to continue or Ctrl+C to exit...\n'
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 ..."
#xcode-select --install

Expand Down

0 comments on commit e97b270

Please sign in to comment.