Last active
August 29, 2015 14:05
-
-
Save mtdowling/eb52940d91318a0506e0 to your computer and use it in GitHub Desktop.
Test installer
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
#!/usr/bin/env bash | |
set -e | |
[ -z "$CHAG_DIR" ] && CHAG_DIR="/usr/local/bin" | |
[ -z "$CHAG_VERSION" ] && CHAG_VERSION="master" | |
CHAG_SOURCE="https://raw.githubusercontent.com/mtdowling/chag/$CHAG_VERSION/chag" | |
echo "=> Downloading chag to '$CHAG_DIR'" | |
curl -sS "$CHAG_SOURCE" -o "$CHAG_DIR/chag" || { | |
echo >&2 "Failed to download '$CHAG_SOURCE'.." | |
return 1 | |
} | |
chmod +x "$CHAG_DIR/chag" || { | |
echo >&2 "Failed setting executable permission on $CHAG_DIR/chag" | |
return 1 | |
} | |
echo "chag is read to use!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment