mirror of
https://gitlab.com/xonotic/xonotic
synced 2024-12-13 18:35:49 +00:00
Instead of "cd .." hackery, find the path of ./all by looking at $0.
This only supports invoking ./all directly (not via $PATH or symlinks), but should already be a lot better than before.
This commit is contained in:
parent
f3821392f5
commit
7cce522db1
19
all
19
all
@ -19,15 +19,20 @@ LF="
|
||||
ESC=""
|
||||
|
||||
d00=`pwd`
|
||||
while ! [ -f ./all ]; do
|
||||
if [ x"`pwd`" = x"/" ]; then
|
||||
case "$0" in
|
||||
/*/all)
|
||||
export d0=${0%/all}
|
||||
;;
|
||||
*/all)
|
||||
export d0=$d00/${0%/all}
|
||||
;;
|
||||
*)
|
||||
$ECHO "Cannot find myself."
|
||||
$ECHO "Please run this script with the working directory inside a Xonotic checkout."
|
||||
exit 1
|
||||
fi
|
||||
cd ..
|
||||
done
|
||||
export d0=`pwd`
|
||||
;;
|
||||
esac
|
||||
cd "$d0"
|
||||
d0=`pwd`
|
||||
SELF="$d0/all"
|
||||
|
||||
# If we are on WINDOWS:
|
||||
|
Loading…
Reference in New Issue
Block a user