From 790e62dbaece454f6a493fa09bb7073729e7211c Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sat, 4 Jun 2011 22:30:57 +0200 Subject: [PATCH] special case pre-1.0 versions to be compatible with any gameversion below 1.0 --- all | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/all b/all index 8b3806e4..a9953207 100755 --- a/all +++ b/all @@ -1847,11 +1847,21 @@ case "$cmd" in versionstr="$versionstr$RELEASETYPE" ;; esac - verbose sed " - s/^set g_xonoticversion [^ ]* /set g_xonoticversion $versionstr /; - s/^gameversion_min [0-9]*/gameversion_min $(( ($gv / 100) * 100 - 100 ))/; - s/^gameversion_max [0-9]*/gameversion_max $(( ($gv / 100) * 100 + 199 ))/; - " < defaultXonotic.cfg > defaultXonotic.cfg.new + if [ $gv -lt 900 ]; then + # pre-1.0: compatible with any other pre-1.0 + verbose sed " + s/^set g_xonoticversion [^ ]* /set g_xonoticversion $versionstr /; + s/^gameversion_min [0-9]*/gameversion_min 0/; + s/^gameversion_max [0-9]*/gameversion_max 9999/; + " < defaultXonotic.cfg > defaultXonotic.cfg.new + else + # >= 1.0 + verbose sed " + s/^set g_xonoticversion [^ ]* /set g_xonoticversion $versionstr /; + s/^gameversion_min [0-9]*/gameversion_min $(( ($gv / 100) * 100 - 100 ))/; + s/^gameversion_max [0-9]*/gameversion_max $(( ($gv / 100) * 100 + 199 ))/; + " < defaultXonotic.cfg > defaultXonotic.cfg.new + fi mv defaultXonotic.cfg.new defaultXonotic.cfg case "$RELEASETYPE" in release) -- 2.39.2