#!/bin/sh PWD=`pwd` # Fetch the path relative to the launch point where this shell script exists. APP_PATH=`echo $0 | awk '{split($0,patharr,"/"); idx=1; while(patharr[idx+3] != "") { if (patharr[idx] != "/") {printf("%s/", patharr[idx]); idx++ }} }'` # Fetch the app name (its our own name) APP_NAME=`echo $0 | awk '{split($0,patharr,"/"); idx=1; while(patharr[idx+1] != "") {idx++} printf("%s", patharr[idx]); }'` cd "$APP_PATH/Contents/Resources" ./$APP_NAME