Skip to content
Browse files

Dereference symlink for sshuttle launch script

(Modified slightly by apenwarr)
  • Loading branch information...
1 parent f5eed4c commit 86363788707260e3d310bcec2ce941e797db9426 @kaizoku kaizoku committed with apenwarr Apr 9, 2011
Showing with 6 additions and 1 deletion.
  1. +6 −1 sshuttle
View
7 sshuttle
@@ -1,5 +1,10 @@
#!/bin/sh
-DIR=$(dirname "$0")
+EXE=$0
+for i in 1 2 3 4 5 6 7 8 9 10; do
+ [ -L "$EXE" ] || break
+ EXE=$(readlink "$EXE")
+done
+DIR=$(dirname "$EXE")
if python2 -V 2>/dev/null; then
exec python2 "$DIR/main.py" python2 "$@"
else

0 comments on commit 8636378

Please sign in to comment.
Something went wrong with that request. Please try again.