Skip to content

Commit f411bc9

Browse files
authored
Merge pull request #54 from xiota/patch-1
Find real script directory when run from symlink.
2 parents 41b52ea + f880376 commit f411bc9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gear360pano.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88

99

1010
# http://stackoverflow.com/questions/59895/can-a-bash-script-tell-which-directory-it-is-stored-in
11-
DIR=$(dirname `which $0`)
11+
WHICH=`which $0`
12+
DIR=$(dirname `readlink -f $WHICH`)
13+
1214
SCRIPTNAME=$0
1315
GALLERYDIR="html"
1416
OUTDIR="$DIR/$GALLERYDIR/data"

0 commit comments

Comments
 (0)