Created
July 4, 2013 12:39
-
-
Save zmalltalker/5927352 to your computer and use it in GitHub Desktop.
Create a Gitorious binary shim
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
#!/bin/sh | |
GITORIOUS_ROOT=$HOME/Projects/gitorious/gitorious | |
CHRUBY=/usr/local/share/chruby/chruby.sh | |
RUBY_VERSION=$GITORIOUS_ROOT/.ruby-version | |
GITORIOUS_BIN=/tmp/installer/gitorious | |
cat << EOF > $GITORIOUS_BIN | |
#!/bin/sh | |
if [ -f $CHRUBY ]; then | |
source $CHRUBY | |
if [ -f $RUBY_VERSION ]; then | |
echo Setting up ruby version | |
source $RUBY_VERSION | |
fi | |
fi | |
exec $GITORIOUS_ROOT/bin/gitorious $@ | |
EOF | |
chmod 0755 $GITORIOUS_BIN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment