Last active
March 2, 2017 22:10
-
-
Save pabl0rg/a17fb4c8c3c3b57eb2833f2125c2b502 to your computer and use it in GitHub Desktop.
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
type jq >/dev/null 2>&1 || { echo >&2 "I require jq but it's not installed. Aborting."; exit 1; } | |
LATEST_KOBALT_URL=`curl -s https://api.github.com/repos/cbeust/kobalt/releases/latest | jq -r ".assets[0] | .browser_download_url" ` | |
LATEST_KOBALT_ZIP=`echo "$LATEST_KOBALT_URL" | rev | cut -d / -f 1 | rev` | |
LATEST_KOBALT=`echo "$LATEST_KOBALT_ZIP" | sed 's/.zip//'` | |
if [ ! -d ~/.kobalt/wrapper/dist/$LATEST_KOBALT ]; then | |
mkdir -p ~/.kobalt/wrapper/dist/ | |
cd ~/.kobalt/wrapper/dist/ | |
curl -LO $LATEST_KOBALT_URL | |
unzip -o $LATEST_KOBALT_ZIP | |
fi | |
chmod +x ~/.kobalt/wrapper/dist/$LATEST_KOBALT/bin/kobaltw | |
~/.kobalt/wrapper/dist/$LATEST_KOBALT/bin/kobaltw --update . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment