This repository has been archived by the owner on Feb 13, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make it easy for Jenkins to modify install script
- Loading branch information
Showing
2 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
set -e | ||
|
||
# This is set by Jenkins during the release process | ||
release=0.0.1 | ||
|
||
function bold_echo { | ||
echo -e "\033[1m$1\033[0m" | ||
} | ||
|
||
bold_echo "Downloading dusty files" | ||
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/dustyd > /usr/local/bin/dustyd | ||
chmod +x /usr/local/bin/dustyd | ||
bold_echo "Authenticating as super user... needed to setup daemon" | ||
sudo -v | ||
bold_echo "Resetting dustyd daemon" | ||
sudo curl -L -o /System/Library/LaunchDaemons/org.gamechanger.dustyd.plist https://raw.githubusercontent.com/gamechanger/dusty/$release/setup/org.gamechanger.dustyd.plist | ||
sudo launchctl unload /System/Library/LaunchDaemons/org.gamechanger.dustyd.plist | ||
bold_echo "Testing dustyd's preflight..." | ||
sudo dustyd --preflight-only | ||
if [ $? != 0 ]; then | ||
bold_echo "Preflight failed; not loading daemon" | ||
exit 1 | ||
fi | ||
bold_echo "Loading dustyd daemon" | ||
sudo launchctl load /System/Library/LaunchDaemons/org.gamechanger.dustyd.plist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters