Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added configurable /bin directory. #5

Merged
merged 1 commit into from Apr 14, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 17 additions & 8 deletions install.sh
@@ -1,17 +1,26 @@
#!/bin/bash #!/bin/bash


CURL=`which curl` BIN_DIR="~/.bin";
if [ x$CURL == x ]; then if [ -n "$1" ]; then
BIN_DIR="$1";
fi

echo $BIN_DIR;

CURL=curl

if [ -z $(which "$CURL") ]; then
echo 'error: curl required to use curlish. Please install it first.' echo 'error: curl required to use curlish. Please install it first.'
exit 1 exit 1
fi fi


echo 'Downloading curlish...' echo 'Downloading curlish...'
mkdir -p ~/.bin mkdir -p $BIN_DIR
curl -s https://raw.github.com/fireteam/curlish/master/curlish.py > ~/.bin/curlish curl -s https://raw.github.com/fireteam/curlish/master/curlish.py > $BIN_DIR/curlish
chmod +x ~/.bin/curlish chmod +x $BIN_DIR/curlish
echo echo
echo "Curlish installed successfully to ~/.bin/curlish" echo "Curlish installed successfully to $BIN_DIR/curlish"
echo "Add ~/.bin to your PATH if you haven't so far:" echo "Add $BIN_DIR to your PATH if you haven't so far:"
echo echo
echo $' echo \'export PATH="$PATH:~/.bin"\' >> ~/.bashrc' echo -n $' echo \'export PATH="$PATH:';
echo "$BIN_DIR\"' >> ~/.bashrc";