Skip to content

Instantly share code, notes, and snippets.

@zmalltalker
Created July 4, 2013 12:39
Show Gist options
  • Save zmalltalker/5927352 to your computer and use it in GitHub Desktop.
Save zmalltalker/5927352 to your computer and use it in GitHub Desktop.
Create a Gitorious binary shim
#!/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