]> git.xonotic.org Git - xonotic/xonotic.git/commitdiff
Detect calling "all" via e.g. ../../all and chdir where it SHOULD be
authorRudolf Polzer <rpolzer@grawp.(none)>
Fri, 2 Apr 2010 18:12:36 +0000 (20:12 +0200)
committerRudolf Polzer <rpolzer@grawp.(none)>
Fri, 2 Apr 2010 18:12:36 +0000 (20:12 +0200)
all

diff --git a/all b/all
index 8b6aa4d8823ebc54d1c5e020dc8a738c3de724f7..6011b54e52ee9f13782f10816c98b2c36088ff08 100755 (executable)
--- a/all
+++ b/all
@@ -51,6 +51,12 @@ fi
 cmd=$1
 shift
 
+case "$0" in
+       */*)
+               cd "${0%/*}"
+               ;;
+esac
+
 d0=`pwd`
 case "$cmd" in
        update|pull)