Skip to content

Commit

Permalink
Merge pull request #54 from xiota/patch-1
Browse files Browse the repository at this point in the history
Find real script directory when run from symlink.
  • Loading branch information
ultramango authored Jul 9, 2018
2 parents 41b52ea + f880376 commit f411bc9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gear360pano.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit f411bc9

Please sign in to comment.