diff options
author | Ishan Bansal <ishan@seeta.in> | 2011-02-04 12:53:17 (GMT) |
---|---|---|
committer | Ishan Bansal <ishan@seeta.in> | 2011-02-04 12:53:17 (GMT) |
commit | ee852209b70c803e6ab1bb69b71c7dafcb1448e7 (patch) | |
tree | ac20673816893b398aed4c4da463b157d9e4899e /hacketyhack |
Diffstat (limited to 'hacketyhack')
-rwxr-xr-x | hacketyhack | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/hacketyhack b/hacketyhack new file mode 100755 index 0000000..8390d67 --- /dev/null +++ b/hacketyhack @@ -0,0 +1,22 @@ +#!/bin/bash + +REALPATH=`readlink -f $0` + +APPPATH="${REALPATH%/*}" +if [ "$APPPATH" = "shoes" ]; then + APPPATH="." +fi +if [ "$APPPATH" = "." ]; then + APPPATH=`pwd` +fi + +# makeself changes the directory to /tmp/selfgzNNNNN. if we're in +# an extracted archive, change back to the directory where we launched. +if [ `pwd | awk '{ sub(/[0-9]+/, ""); print }'` = "/tmp/selfgz" ]; then + # fix the symlink, this is actually a bug in the minitar lib + rm -f libruby.so.1.8 + ln -s libruby.so libruby.so.1.8 + cd "$OLDPWD" +fi +cd "$OLDPWD" +LD_LIBRARY_PATH=$APPPATH $APPPATH/hacketyhack-bin "$@" |