diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2013-01-27 15:00:27 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2013-01-27 15:00:27 +0100 |
commit | e1daac32c5b7ca0d902c16135d361aa5303f5124 (patch) | |
tree | 3ebe514ae823d23b26c96d8d2db9c6b97e191de4 /app | |
parent | 11c930f71db58201994265b71a8f76187f1dbda1 (diff) | |
download | app.sh-e1daac32c5b7ca0d902c16135d361aa5303f5124.tar.gz app.sh-e1daac32c5b7ca0d902c16135d361aa5303f5124.tar.bz2 app.sh-e1daac32c5b7ca0d902c16135d361aa5303f5124.tar.xz app.sh-e1daac32c5b7ca0d902c16135d361aa5303f5124.zip |
o Creating an initial version of install-file.
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 |