diff options
Diffstat (limited to 'app')
-rwxr-xr-x | app | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -1,19 +1,5 @@ #!/bin/bash -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` - usage() { if [ -n "$1" ] then @@ -30,6 +16,20 @@ usage() { echo "Run $0 -h <group> for more help" >&2 } +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` + . $APPSH_HOME/lib/common while getopts "h" opt |