aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2013-01-27 15:00:27 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2013-01-27 15:00:27 +0100
commite1daac32c5b7ca0d902c16135d361aa5303f5124 (patch)
tree3ebe514ae823d23b26c96d8d2db9c6b97e191de4 /app
parent11c930f71db58201994265b71a8f76187f1dbda1 (diff)
downloadapp.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-xapp28
1 files changed, 14 insertions, 14 deletions
diff --git a/app b/app
index 880026a..a70b026 100755
--- a/app
+++ b/app
@@ -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