diff options
author | Solly Ross <sross@redhat.com> | 2015-03-26 16:57:17 -0400 |
---|---|---|
committer | Solly Ross <sross@redhat.com> | 2015-03-26 16:57:17 -0400 |
commit | 2ace90e6d593fa0b38589239fe6ba6599d00d2b6 (patch) | |
tree | 854c8ccb4860f59807a871b8a64a04eefcbf186a | |
parent | 16b3ef77d15179076144d45c9edfdb6d37beb41e (diff) | |
download | novnc-bug/follow-symlinks-for-here.tar.gz |
Follow symbolic links in launch.shbug/follow-symlinks-for-here
Previously, in launch.sh, `$HERE` was the directory of `$0`.
However, if `$0` was actually a symlink, `$HERE` would be
wherever the symlink was, which could cause issues (for
example, the script wouldn't be able to local `$WEB` or
`$WEBSOCKIFY` properly).
Now, `$HERE` looks at whatever `$0` points at instead.
Closes #447.
-rwxr-xr-x | utils/launch.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/launch.sh b/utils/launch.sh index ab9a6ef..2a0106d 100755 --- a/utils/launch.sh +++ b/utils/launch.sh @@ -22,7 +22,8 @@ usage() { } NAME="$(basename $0)" -HERE="$(cd "$(dirname "$0")" && pwd)" +REAL_NAME="$(readlink -f $0)" +HERE="$(cd "$(dirname "$REAL_NAME")" && pwd)" PORT="6080" VNC_DEST="localhost:5900" CERT="" |