Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Added configurable /bin directory. #5

Merged
merged 1 commit into from

2 participants

@nemec

/bin dir is provided as the first argument to the install script, defaults to ~/.bin.
Also fixed CURL detection to use a more standard syntax.

@nemec nemec Added configurable /bin directory.
/bin dir is provided as the first argument to the install script.
Also fixed CURL detection to use a more standard syntax.
92d526d
@mitsuhiko mitsuhiko merged commit ca5743a into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 7, 2012
  1. @nemec

    Added configurable /bin directory.

    nemec authored
    /bin dir is provided as the first argument to the install script.
    Also fixed CURL detection to use a more standard syntax.
This page is out of date. Refresh to see the latest.
Showing with 17 additions and 8 deletions.
  1. +17 −8 install.sh
View
25 install.sh
@@ -1,17 +1,26 @@
#!/bin/bash
-CURL=`which curl`
-if [ x$CURL == x ]; then
+BIN_DIR="~/.bin";
+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.'
exit 1
fi
echo 'Downloading curlish...'
-mkdir -p ~/.bin
-curl -s https://raw.github.com/fireteam/curlish/master/curlish.py > ~/.bin/curlish
-chmod +x ~/.bin/curlish
+mkdir -p $BIN_DIR
+curl -s https://raw.github.com/fireteam/curlish/master/curlish.py > $BIN_DIR/curlish
+chmod +x $BIN_DIR/curlish
echo
-echo "Curlish installed successfully to ~/.bin/curlish"
-echo "Add ~/.bin to your PATH if you haven't so far:"
+echo "Curlish installed successfully to $BIN_DIR/curlish"
+echo "Add $BIN_DIR to your PATH if you haven't so far:"
echo
-echo $' echo \'export PATH="$PATH:~/.bin"\' >> ~/.bashrc'
+echo -n $' echo \'export PATH="$PATH:';
+echo "$BIN_DIR\"' >> ~/.bashrc";
Something went wrong with that request. Please try again.