From: Rudolf Polzer Date: Fri, 2 Apr 2010 18:12:36 +0000 (+0200) Subject: Detect calling "all" via e.g. ../../all and chdir where it SHOULD be X-Git-Tag: xonotic-v0.1.0preview~515 X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=commitdiff_plain;h=db1393bf338eafd04c38ed4f94769da4821e8ecf Detect calling "all" via e.g. ../../all and chdir where it SHOULD be --- diff --git a/all b/all index 8b6aa4d8..6011b54e 100755 --- 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)