echo FATAL: unrecognized Xonotic build. This update script cannot be used.\r
goto end\r
:xonoticdatahigh\r
- set url=rsync://beta.xonotic.org/%buildtype%-Xonotic-high/\r
+ set package=Xonotic-high\r
goto endxonoticdata\r
:xonoticdatahighfuzzy\r
- set url=rsync://beta.xonotic.org/%buildtype%-Xonotic-high/\r
+ set package=Xonotic-high\r
set options=%options% -y\r
goto endxonoticdata\r
:xonoticdatanormal\r
- set url=rsync://beta.xonotic.org/%buildtype%-Xonotic/\r
+ set package=Xonotic\r
goto endxonoticdata\r
:xonoticdatanormalfuzzy\r
- set url=rsync://beta.xonotic.org/%buildtype%-Xonotic/\r
+ set package=Xonotic\r
set options=%options% -y\r
goto endxonoticdata\r
:endxonoticdata\r
set target=./\r
goto endxonotic\r
:xonotic\r
- set url=rsync://beta.xonotic.org/%buildtype%-Xonotic/\r
+ set package=Xonotic\r
set target=Xonotic/\r
goto endxonotic\r
:endxonotic\r
+set url=beta.xonotic.org/%buildtype%-%package%\r
\r
set excludes=\r
if not "%XONOTIC_INCLUDE_ALL%" == "" goto endbit\r
:endbit\r
\r
for %%f in (*.exe *.dll) do copy /b %%f %TEMP%\xonotic-rsync-updater\\r
-%TEMP%\xonotic-rsync-updater\rsync %options% %excludes% %url% %target%\r
+cd %target%\r
+echo Updating %CD% from %url% ...\r
+%TEMP%\xonotic-rsync-updater\rsync %options% %excludes% rsync://%url%/ %target%\r
%TEMP%\xonotic-rsync-updater\chmod -R a+x %target%\r
\r
:end\r
options="-Prtzil --executability --delete-after --delete-excluded --stats"
+package="Xonotic"
+target="../../.."
if [ -d "../../../.git" ]; then
echo >&2 "NOTE: this is a git repository download. Using the regular update method."
exec ../../../all update
elif [ -e "Xonotic" ]; then
echo "found manually created 'Xonotic' file"
- echo "targetting the normal $buildtype version"
- url="rsync://beta.xonotic.org/$buildtype-Xonotic/"
- target="../../.."
options="$options -y" # use fuzzy matching because file names may differ
elif [ -e "Xonotic-high" ]; then
echo "found manually created 'Xonotic-high' file"
- echo "targetting the high $buildtype version"
- url="rsync://beta.xonotic.org/$buildtype-Xonotic-high/"
- target="../../.."
+ package="Xonotic-high"
options="$options -y" # use fuzzy matching because file names may differ
elif [ -d "../../../data" ]; then
if [ -f ../../../data/xonotic-rsync-data-high.pk3 ]; then
echo "found rsync high data files"
- echo "targetting the high $buildtype version"
- url="rsync://beta.xonotic.org/$buildtype-Xonotic-high/"
+ package="Xonotic-high"
elif [ -f ../../../data/xonotic-*-data-high.pk3 ]; then
echo "found release high data files"
- echo "targetting the high $buildtype version"
- url="rsync://beta.xonotic.org/$buildtype-Xonotic-high/"
+ package="Xonotic-high"
options="$options -y" # use fuzzy matching because file names differ
elif [ -f ../../../data/xonotic-rsync-data.pk3 ]; then
echo "found Xonotic rsync data files"
- echo "targetting the normal $buildtype version"
- url="rsync://beta.xonotic.org/$buildtype-Xonotic/"
elif [ -f ../../../data/xonotic-*-data.pk3 ]; then
echo "found Xonotic release data files"
- echo "targetting the normal $buildtype version"
- url="rsync://beta.xonotic.org/$buildtype-Xonotic/"
options="$options -y" # use fuzzy matching because file names differ
else
echo >&2 "FATAL: unrecognized Xonotic build. This update script cannot be used."
exit 1
fi
- target="../../.."
else
- url="rsync://beta.xonotic.org/$buildtype-Xonotic/"
target="Xonotic/"
fi
+url="beta.xonotic.org/$buildtype-$package"
excludes=
if [ -z "$XONOTIC_INCLUDE_ALL" ]; then
esac
fi
-rsync $options $excludes "$url" "$target"
+resolvedtarget=$(cd $target && [ "${PWD#$HOME}" != "$PWD" ] && printf "~${PWD#$HOME}" || printf "$PWD")
+printf "Updating \033[1;34m$resolvedtarget\033[m from \033[0;36m$url \033[m...\n"
+rsync $options $excludes "rsync://$url/" "$target"
echo FATAL: unrecognized Xonotic build. This update script cannot be used.\r
goto end\r
:xonoticdatahigh\r
- set url=rsync://beta.xonotic.org/%buildtype%-Xonotic-high/\r
+ set package=Xonotic-high\r
goto endxonoticdata\r
:xonoticdatahighfuzzy\r
- set url=rsync://beta.xonotic.org/%buildtype%-Xonotic-high/\r
+ set package=Xonotic-high\r
set options=%options% -y\r
goto endxonoticdata\r
:xonoticdatanormal\r
- set url=rsync://beta.xonotic.org/%buildtype%-Xonotic/\r
+ set package=Xonotic\r
goto endxonoticdata\r
:xonoticdatanormalfuzzy\r
- set url=rsync://beta.xonotic.org/%buildtype%-Xonotic/\r
+ set package=Xonotic\r
set options=%options% -y\r
goto endxonoticdata\r
:endxonoticdata\r
set target=./\r
goto endxonotic\r
:xonotic\r
- set url=rsync://beta.xonotic.org/%buildtype%-Xonotic/\r
+ set package=Xonotic\r
set target=Xonotic/\r
goto endxonotic\r
:endxonotic\r
+set url=beta.xonotic.org/%buildtype%-%package%\r
\r
set excludes=\r
if not "%XONOTIC_INCLUDE_ALL%" == "" goto endbit\r
:endbit\r
\r
for %%f in (*.exe *.dll) do copy /b %%f %TEMP%\xonotic-rsync-updater\\r
-%TEMP%\xonotic-rsync-updater\rsync %options% %excludes% %url% %target%\r
+cd %target%\r
+echo Updating %CD% from %url% ...\r
+%TEMP%\xonotic-rsync-updater\rsync %options% %excludes% rsync://%url%/ %target%\r
%TEMP%\xonotic-rsync-updater\chmod -R a+x %target%\r
\r
:end\r