From a017259636930975153fe1be1828bc5d13b3eefb Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Thu, 17 Nov 2011 11:20:17 +0100 Subject: [PATCH] make sure the rsync updater is always executed from its own dir --- misc/tools/rsync-updater/update-xonotic.bat | 2 ++ misc/tools/rsync-updater/update-xonotic.sh | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/misc/tools/rsync-updater/update-xonotic.bat b/misc/tools/rsync-updater/update-xonotic.bat index ab2df09f..db76dd52 100644 --- a/misc/tools/rsync-updater/update-xonotic.bat +++ b/misc/tools/rsync-updater/update-xonotic.bat @@ -1,5 +1,7 @@ @echo off +cd %~dp0 + set options=-Prtzil --executability --delete-after --delete-excluded --stats if exist Xonotic-low goto xonoticlow diff --git a/misc/tools/rsync-updater/update-xonotic.sh b/misc/tools/rsync-updater/update-xonotic.sh index 9bc07cd3..095e2a6f 100755 --- a/misc/tools/rsync-updater/update-xonotic.sh +++ b/misc/tools/rsync-updater/update-xonotic.sh @@ -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 -- 2.39.2