opensim-development – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | eva | 1 | #!/bin/sh |
2 | |||
3 | PWD=`pwd` |
||
4 | |||
5 | # Fetch the path relative to the launch point where this shell script exists. |
||
6 | APP_PATH=`echo $0 | awk '{split($0,patharr,"/"); idx=1; while(patharr[idx+3] != "") { if (patharr[idx] != "/") {printf("%s/", patharr[idx]); idx++ }} }'` |
||
7 | |||
8 | # Fetch the app name (its our own name) |
||
9 | APP_NAME=`echo $0 | awk '{split($0,patharr,"/"); idx=1; while(patharr[idx+1] != "") {idx++} printf("%s", patharr[idx]); }'` |
||
10 | |||
11 | cd "$APP_PATH/Contents/Resources" |
||
12 | |||
13 | ./$APP_NAME |