Skip to content

Instantly share code, notes, and snippets.

@steve-ross
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steve-ross/03575614a30723afe504 to your computer and use it in GitHub Desktop.
Save steve-ross/03575614a30723afe504 to your computer and use it in GitHub Desktop.
testing modman installer fix
#!/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