diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2012-10-14 08:55:36 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2012-10-14 08:55:36 +0200 |
commit | e9a22d5165c2dda5a0e10506977081222549a8eb (patch) | |
tree | 995e471a537719ecd950dfdccb8043836ab406ce /app | |
parent | a7a62352c46b5d2b37baaa09f8145b1171ca79fb (diff) | |
download | app.sh-e9a22d5165c2dda5a0e10506977081222549a8eb.tar.gz app.sh-e9a22d5165c2dda5a0e10506977081222549a8eb.tar.bz2 app.sh-e9a22d5165c2dda5a0e10506977081222549a8eb.tar.xz app.sh-e9a22d5165c2dda5a0e10506977081222549a8eb.zip |
o Making sure ./app can be symlinked to an installation.
o More tests.
Diffstat (limited to 'app')
-rwxr-xr-x | app | 22 |
1 files changed, 18 insertions, 4 deletions
@@ -2,6 +2,20 @@ set -e +PRG="$0" +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname "$PRG"`/$link" + fi +done + +APPSH_HOME=`dirname "$PRG"` +APPSH_HOME=`cd "$APPSH_HOME" && pwd` + if [ -z "$BASEDIR" ] then BASEDIR=`dirname $0` @@ -28,10 +42,10 @@ method_usage() { echo "Run $0 -h <group> for more help" >&2 } -. $BASEDIR/.app/lib/app-common -. $BASEDIR/.app/lib/app-app -. $BASEDIR/.app/lib/app-conf -. $BASEDIR/.app/lib/app-operate +. $APPSH_HOME/.app/lib/app-common +. $APPSH_HOME/.app/lib/app-app +. $APPSH_HOME/.app/lib/app-conf +. $APPSH_HOME/.app/lib/app-operate main() { local method |