Permalink
Browse files

Update OSX shell script to work if it is invoked via a symlink

  • Loading branch information...
1 parent 2706746 commit 0c058439c4ad9b9d186687d3ae934971cb68fda4 @danlucraft committed Mar 29, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 assets/redcar.sh
View
@@ -1,3 +1,9 @@
#!/bin/sh
-BASEDIR=`dirname $0`
+if [ -h "$0" ]
+then
+ BASEDIR=`dirname $(readlink $0)`
+else
+ BASEDIR=`dirname $0`
+fi
+
exec java -XstartOnFirstThread -Dfile.encoding=UTF8 -d32 -classpath $BASEDIR/vendor/jruby-complete.jar:$BASEDIR org.jruby.Main $BASEDIR/bin/redcar --no-sub-jruby --show-log --log-level=debug

0 comments on commit 0c05843

Please sign in to comment.