Skip to content

Instantly share code, notes, and snippets.

@nnnnathann
Created October 19, 2015 23:00
Show Gist options
  • Save nnnnathann/d820e98eec9e103aa43c to your computer and use it in GitHub Desktop.
Save nnnnathann/d820e98eec9e103aa43c to your computer and use it in GitHub Desktop.
#!/bin/bash
VERSION=${1:-v2.0.4}
ETCD_VERSION_STRING="etcd-$VERSION-darwin-amd64"
curl -L https://github.com/coreos/etcd/releases/download/$VERSION/$ETCD_VERSION_STRING.zip -o $ETCD_VERSION_STRING.zip
unzip $ETCD_VERSION_STRING.zip
sudo cp $ETCD_VERSION_STRING/etcdctl /usr/local/bin/
sudo chmod +x /usr/local/bin/etcdctl
rm -r $ETCD_VERSION_STRING
rm $ETCD_VERSION_STRING.zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment