]> git.xonotic.org Git - xonotic/xonotic.git/commitdiff
make sure the rsync updater is always executed from its own dir
authorRudolf Polzer <divVerent@xonotic.org>
Thu, 17 Nov 2011 10:20:17 +0000 (11:20 +0100)
committerRudolf Polzer <divVerent@xonotic.org>
Thu, 17 Nov 2011 10:20:17 +0000 (11:20 +0100)
misc/tools/rsync-updater/update-xonotic.bat
misc/tools/rsync-updater/update-xonotic.sh

index ab2df09f8c8d21ca07decb73a3f87a0c78780325..db76dd522bcda263f02ae83a876cd7391b159d53 100644 (file)
@@ -1,5 +1,7 @@
 @echo off\r
 \r
+cd %~dp0\r
+\r
 set options=-Prtzil --executability --delete-after --delete-excluded --stats\r
 \r
 if exist Xonotic-low goto xonoticlow\r
index 9bc07cd387c9b667de92a91a352025f9ac2cf4c5..095e2a6fd350d9e8f256ecbf14660bfc9d292c3d 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