Created
January 6, 2017 08:04
-
-
Save sagikazarmark/b61ffdc0a6520d5d405b15fbef37e61d to your computer and use it in GitHub Desktop.
Glide 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
#!/bin/sh | |
if [ ! -d "$1" ]; then | |
echo "The given directory does not exists" 1>&2 | |
exit 1 | |
fi | |
GLIDE_OS_ARCH=`go env GOHOSTOS`-`go env GOHOSTARCH` | |
GLIDE_TAG=$(curl -s https://glide.sh/version) | |
GLIDE_LATEST_RELEASE_URL="https://github.com/Masterminds/glide/releases/download/${GLIDE_TAG}/glide-${GLIDE_TAG}-${GLIDE_OS_ARCH}.tar.gz" | |
wget ${GLIDE_LATEST_RELEASE_URL} -O /tmp/glide.tar.gz | |
mkdir /tmp/glide | |
tar --directory=/tmp/glide -xvf /tmp/glide.tar.gz | |
cp /tmp/glide/${GLIDE_OS_ARCH}/glide $1 | |
rm -rf /tmp/glide.tar.gz /tmp/glide/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment