Skip to content
Browse files

removing dependency on git and updating README

  • Loading branch information...
1 parent d849206 commit c30ba59074fa57bd711c8be93ef7c01cf1339f58 @pseudomuto pseudomuto committed Aug 19, 2013
Showing with 13 additions and 11 deletions.
  1. +3 −3 README.md
  2. +10 −8 install.sh
View
6 README.md
@@ -4,9 +4,9 @@ Octocatsay
You know [cowsay](http://www.nog.net/~tony/warez/cowsay.shtml), right? Well...
```sh
-$ git clone git://github.com/cobyism/octocatsay.git
-$ cd octocatsay
-$ ./octocatsay 'BOOYAH!'
+$ curl https://raw.github.com/cobyism/octocatsay/master/install.sh | $(which bash)
+$ source ~/.bashrc
+$ octocatsay 'BOOYAH!'
$
MMM. .MMM
View
18 install.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-SOURCE_REPO=https://github.com/cobyism/octocatsay.git
+SCRIPT_FILE=https://raw.github.com/cobyism/octocatsay/master/bin/octocatsay
APP_DIR=.octocatsay
# allow param for testing...
@@ -12,21 +12,23 @@ echo "Installing into $INSTALL_DIR/$APP_DIR..."
cd $INSTALL_DIR
-# clone/update the repo
+# ensure the bin folder exists
-if [ -d $APP_DIR ]; then
- cd $APP_DIR
- echo "Already installed. Updating from origin..."
- git pull origin master
-else
- git clone $SOURCE_REPO $APP_DIR
+if [ ! -d $APP_DIR ]; then
+ mkdir -p $APP_DIR/bin
fi
+cd $APP_DIR/bin
+
+# get the file and save (overwriting if needed)
+curl $SCRIPT_FILE > octocatsay
+
# update path (if necessary)
if [ ! $(echo $PATH | fgrep "$INSTALL_DIR/$APP_DIR/bin") ] ; then
echo "Adding $APP_DIR to PATH."
echo "PATH=$INSTALL_DIR/$APP_DIR/bin:\$PATH" >> ~/.bashrc
+ echo "PATH=$INSTALL_DIR/$APP_DIR/bin:\$PATH" >> ~/.bash_profile
source ~/.bashrc
echo "run 'source ~/.bashrc' to update path in the current shell."

0 comments on commit c30ba59

Please sign in to comment.
Something went wrong with that request. Please try again.