]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/tools/rsync-updater/update-xonotic.sh
why not have same logic on Linux too
[xonotic/xonotic.git] / misc / tools / rsync-updater / update-xonotic.sh
index da21ff552c321040736821ebd571b21f4e0535c1..d34c7e34842a28f9e100109cb701b88e5c9c6121 100755 (executable)
@@ -1,5 +1,9 @@
 #!/bin/sh
 
+if [ -d "${0%/*}" ]; then
+       cd "${0%/*}"
+fi
+
 if ! which rsync >/dev/null; then
        echo >&2 "FATAL: rsync not found, please install the rsync package"
        exit 1
@@ -13,7 +17,7 @@ if [ -d "Xonotic-low" ]; then
 elif [ -d "Xonotic-high" ]; then
        url="rsync://beta.xonotic.org/autobuild-Xonotic-high/"
        target="Xonotic-high/"
-elif [ -d "../../../data/.git" ]; then
+elif [ -d "../../../.git" ]; then
        echo >&2 "NOTE: this is a git repository download. Using the regular update method."
        exec ../../../all update
 elif [ -d "../../../data" ]; then
@@ -58,8 +62,10 @@ case `uname`:`uname -m` in
                excludes="$excludes --exclude=/Xonotic*.app"
                excludes="$excludes --exclude=/xonotic-osx-*"
                excludes="$excludes --exclude=/fteqcc/fteqcc.osx"
-               excludes="$excludes --exclude=/xonotic-linux32-*"
-               excludes="$excludes --exclude=/fteqcc/fteqcc.linux32"
+               if [ -z "$XONOTIC_INCLUDE_32BIT" ]; then
+                       excludes="$excludes --exclude=/xonotic-linux32-*"
+                       excludes="$excludes --exclude=/fteqcc/fteqcc.linux32"
+               fi
                ;;
        Linux:i?86)
                excludes="$excludes --exclude=/Xonotic*.app"