diff options
Diffstat (limited to 'x11vnc/misc/enhanced_tightvnc_viewer/bin/ssl_vnc_gui')
-rwxr-xr-x | x11vnc/misc/enhanced_tightvnc_viewer/bin/ssl_vnc_gui | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/x11vnc/misc/enhanced_tightvnc_viewer/bin/ssl_vnc_gui b/x11vnc/misc/enhanced_tightvnc_viewer/bin/ssl_vnc_gui index abdb2d3..a077054 100755 --- a/x11vnc/misc/enhanced_tightvnc_viewer/bin/ssl_vnc_gui +++ b/x11vnc/misc/enhanced_tightvnc_viewer/bin/ssl_vnc_gui @@ -21,6 +21,7 @@ fi PATH=$PATH:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/openwin/bin export PATH + SSL_VNC_GUI_CMD="$0 $*" export SSL_VNC_GUI_CMD SSL_VNC_LAUNCH=$SSL_VNC_GUI_CMD @@ -30,19 +31,26 @@ export SSL_VNC_LAUNCH # name=$UNAME if [ "X$name" = "X" ]; then - name=`uname -sm | sed -e 's/ /./'` + name=`uname -sm | sed -e 's/ /./g'` fi -if [ -L "$0" ]; then - d=`dirname "\`ls -l "$0" | sed -e 's/^.* -> //'\`"` - if echo "$d" | grep '^/' > /dev/null; then - dir="$d" +f="$0" +for t in 1 2 3 4 5 +do + if [ -L "$f" ]; then + f0="$f" + f=`ls -l "$f" | sed -e 's/^.* -> //'` + if echo "$f" | grep '^/' > /dev/null; then + : + else + f="`dirname "$f0"`/$f" + fi else - dir="`dirname "$0"`/$d" + break fi -else - dir=`dirname "$0"` -fi +done +dir=`dirname "$f"` + if [ ! -d "$dir/$name" ]; then echo "cannot find platform dir: $dir/$name for your OS:" uname -sm @@ -54,6 +62,12 @@ fi # pick them up: # PATH="$dir:$dir/$name:$dir/util:$PATH" +if echo "$dir" | grep '^/' > /dev/null; then + : +else + dir=`pwd`/$dir + PATH="$dir:$dir/$name:$dir/util:$PATH" +fi SSL_VNC_BASEDIR="$dir" export SSL_VNC_BASEDIR |