Skip to content

Instantly share code, notes, and snippets.

@mtdowling
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mtdowling/eb52940d91318a0506e0 to your computer and use it in GitHub Desktop.
Save mtdowling/eb52940d91318a0506e0 to your computer and use it in GitHub Desktop.
Test installer
#!/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