Skip to content
This repository has been archived by the owner on Feb 13, 2020. It is now read-only.

Commit

Permalink
Merge pull request #678 from gamechanger/cb-usr-local-bin-perms
Browse files Browse the repository at this point in the history
/usr/local/bin not writeable by non-root (default)
  • Loading branch information
thieman authored May 24, 2017
2 parents a382a49 + 51ca45d commit 5fdd719
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions setup/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,19 @@ LEGACY_INSTALL_ROOT=/System/Library/LaunchDaemons
LEGACY_PLIST_NAME=org.gamechanger.dusty.plist
INSTALL_ROOT=/Library/LaunchDaemons
PLIST_NAME=com.gamechanger.dusty.plist
TMP_DIR=`mktemp -d`

function bold_echo {
echo -e "\033[1m$1\033[0m"
}

bold_echo "Downloading dusty binary"
curl -L https://github.com/gamechanger/dusty/releases/download/$release/dusty > /usr/local/bin/dusty
chmod +x /usr/local/bin/dusty
curl -L https://github.com/gamechanger/dusty/releases/download/$release/dusty > $TMP_DIR/dusty
chmod +x $TMP_DIR/dusty
bold_echo "Authenticating as super user... needed to setup daemon"
sudo -v
bold_echo "Moving dusty binary into place"
sudo mv -f $TMP_DIR/dusty /usr/local/bin/dusty
bold_echo "Resetting dusty daemon"
sudo curl -L -o $INSTALL_ROOT/$PLIST_NAME https://raw.githubusercontent.com/gamechanger/dusty/$release/setup/$PLIST_NAME
sudo launchctl unload $INSTALL_ROOT/$PLIST_NAME
Expand Down

0 comments on commit 5fdd719

Please sign in to comment.