Skip to content

Commit

Permalink
Merge pull request #777 from mikemckibben/fix/play_launch_script_rels…
Browse files Browse the repository at this point in the history
…ymlinks

add support for relative symbolic link to play launch script. Fixes tick...
  • Loading branch information
huntc committed Apr 8, 2013
2 parents 2464219 + 5dfd274 commit 626d2ca
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions play
@@ -1,16 +1,22 @@
#! /usr/bin/env sh

PRG="$0"
# resolve relative/absolute symlinks
while [ -h "$PRG" ] ; do
PRG=`readlink "$PRG"`
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG="`dirname "$PRG"`/$link"
fi
done

dir=`dirname $PRG`

if [ -z "$JAVA_HOME" ]; then
JAVA="java"
JAVA="java"
else
JAVA="$JAVA_HOME/bin/java"
JAVA="$JAVA_HOME/bin/java"
fi

if [ -f conf/application.conf -o -f conf/reference.conf ] || [ -d project ]; then
Expand Down

0 comments on commit 626d2ca

Please sign in to comment.