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

Commit

Permalink
Make it easy for Jenkins to modify install script
Browse files Browse the repository at this point in the history
  • Loading branch information
thieman committed Jun 9, 2015
1 parent 20b65d0 commit 2eedfd1
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
27 changes: 27 additions & 0 deletions setup/Sedfile
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
6 changes: 5 additions & 1 deletion setup/install.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
set -e
release=0.0.2

# This is set by Jenkins during release
release=

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
Expand Down

0 comments on commit 2eedfd1

Please sign in to comment.