diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-08-13 12:29:03 +0000 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-08-13 12:29:03 +0000 |
commit | 63cd2b169354de68ab878b53a043d5b9efa75183 (patch) | |
tree | 21baf758a6487349d5b5d3cc3418009f39ea4ec8 /client/trunk/packaging | |
parent | bb8b50baffc429aa711e8c1a756a01924007745f (diff) | |
download | instadisc-63cd2b169354de68ab878b53a043d5b9efa75183.tar.gz instadisc-63cd2b169354de68ab878b53a043d5b9efa75183.tar.bz2 instadisc-63cd2b169354de68ab878b53a043d5b9efa75183.zip |
Client: Wrote loader script
Because the Client is written in Java, it cannot be run from any directory regardless of path easily. So, with the addition of a loader script that calls the Java JAR, the command "instadisc" can still be run from any directory.
Diffstat (limited to 'client/trunk/packaging')
-rwxr-xr-x | client/trunk/packaging/instadisc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/client/trunk/packaging/instadisc b/client/trunk/packaging/instadisc new file mode 100755 index 0000000..8b8a420 --- /dev/null +++ b/client/trunk/packaging/instadisc | |||
@@ -0,0 +1,20 @@ | |||
1 | #!/bin/sh | ||
2 | # InstaDisc Client Loader | ||
3 | # | ||
4 | # Copyright 2008 Four Island | ||
5 | |||
6 | PRG=$0 | ||
7 | |||
8 | while [ -h "$PRG" ]; do | ||
9 | ls=`ls -ld "$PRG"` | ||
10 | link=`expr "$ls" : '^.*-> \(.*\)$' 2>/dev/null` | ||
11 | if expr "$link" : '^/' 2> /dev/null >/dev/null; then | ||
12 | PRG="$link" | ||
13 | else | ||
14 | PRG="`dirname "$PRG"`/$link" | ||
15 | fi | ||
16 | done | ||
17 | |||
18 | progdir=`dirname "$PRG"` | ||
19 | |||
20 | java -jar "$progdir/InstaDisc.jar" $* | ||