Created
July 13, 2015 11:33
-
-
Save davidporter-id-au/264cadd824e1afb09707 to your computer and use it in GitHub Desktop.
nuget-installer
This file contains hidden or 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/bash -e | |
# Poor man's installer for nuget | |
# Tested only on OSX, other OSs milage may vary | |
INSTALL_PATH="/usr/local/lib/nuget" | |
BIN_PATH="/usr/local/bin/" | |
echo "Installing nuget.exe to $INSTALL_PATH" | |
if [[ ! -d "$INSTALL_PATH" ]]; then | |
mkdir -p $INSTALL_PATH | |
cd $INSTALL_PATH | |
else | |
#clean up existing folder | |
cd $INSTALL_PATH | |
rm -rf * || true | |
fi | |
curl -L https://nuget.org/nuget.exe -o nuget.exe | |
curl https://gist.githubusercontent.com/davidporter-id-au/18cbb34a6549ce916132/raw/b290aa4b514ecf864d74d9fc33b625dfa354cc6d/gistfile1.sh > nuget.sh | |
chmod +x nuget.sh | |
if [ -h /usr/local/bin/nuget ]; then | |
unlink /usr/local/bin/nuget | |
fi | |
# put it on the $PATH | |
ln -s $(pwd)/nuget.sh "$BIN_PATH"nuget | |
echo "Installation done. run 'nuget' to use" | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment