Created
December 25, 2015 22:40
-
-
Save roryk/318b347128bf5df8fee5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/bash | |
set -e | |
# Figure out where this script is located. | |
SELFSCRIPT="`readlink -f \"$0\"`" | |
SELFDIR="`dirname \"$SELFSCRIPT\"`" | |
SELFDIR="`cd \"$SELFDIR\" && pwd`" | |
# Temporarily set PATH and LD_LIBRARY_PATH | |
export PATH=$SELFDIR/bin:$PATH | |
export LD_LIBRARY_PATH=$SELFDIR/lib:$LD_LIBRARY_PATH | |
export DYLD_FALLBACK_LIBRARY_PATH=$SELFDIR/lib:$DYLD_FALLBACK_LIBRARY_PATH | |
# Tell Bundler where the Gemfile and gems are. | |
export BUNDLE_GEMFILE="$SELFDIR/lib/app/Gemfile" | |
unset BUNDLE_IGNORE_CONFIG | |
# Tell transrate this is the packaged version | |
export TRANSRATE_PACKAGED_BINARY=true | |
# Run the actual app using the bundled Ruby interpreter, with Bundler activated. | |
exec "$SELFDIR/lib/app/ruby/bin/ruby" -rbundler/setup "$SELFDIR/lib/app/bin/transrate" $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment