]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - all
Merge branch 'master' of git://git.xonotic.org/xonotic/xonotic
[xonotic/xonotic.git] / all
diff --git a/all b/all
index 92e63400ab973e30be8709e80c2e1ba967f1bd98..b229ae3d98cb99a95e570a6912cbf6f9bba31d21 100755 (executable)
--- a/all
+++ b/all
@@ -1848,11 +1848,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)