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)