diff --git a/gear360pano.sh b/gear360pano.sh index 5f7a3e6..1a330ab 100755 --- a/gear360pano.sh +++ b/gear360pano.sh @@ -8,7 +8,9 @@ # http://stackoverflow.com/questions/59895/can-a-bash-script-tell-which-directory-it-is-stored-in -DIR=$(dirname `which $0`) +WHICH=`which $0` +DIR=$(dirname `readlink -f $WHICH`) + SCRIPTNAME=$0 GALLERYDIR="html" OUTDIR="$DIR/$GALLERYDIR/data"