Last active
August 29, 2015 14:05
-
-
Save steve-ross/03575614a30723afe504 to your computer and use it in GitHub Desktop.
testing modman installer fix
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
#!/usr/bin/env bash | |
if [ ! -d "$HOME/bin" ] ; then | |
mkdir $HOME/bin | |
if [ -f $HOME/.profile ]; then | |
tty -s && . $HOME/.profile | |
if [[ ":$PATH:" != *":$HOME/bin:"* ]]; then | |
echo -e '\nPATH="$HOME/bin:$PATH"' >> $HOME/.profile | |
fi | |
fi | |
fi | |
SRC="https://raw.github.com/colinmollenhour/modman/master/modman" | |
DEST="$HOME/bin/modman" | |
# test if curl/wget is installed | |
if hash curl 2>&- ; then | |
CMD="curl -s -L $SRC -o $DEST" | |
elif hash wget 2>&- ; then | |
CMD="wget -q -O $DEST $SRC" | |
else | |
echo "You need to have curl or wget installed." | |
exit 1 | |
fi | |
$CMD | |
chmod +x $DEST | |
echo "Done. Modman installed in $HOME/bin/modman" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment