#!/usr/bin/env bash
#/***********************************************************************
# Freeciv - Copyright (C) 2017-2025
#   This program is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; either version 2, or (at your option)
#   any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#***********************************************************************/

SRCDIR="$(cd $(dirname $0) ; pwd)"

(
  echo "# Generated by generate_rs_upgrade.sh."
  echo
  echo "# rulesets_upgrade.sh"
  echo "# Exits with 0 when each ruleset specified in upgrade_ruleset_list.txt"
  echo "# can be saved using ruleup."
  echo "# Exits with 1 if not."
  echo
  echo "FREECIV_DATA_PATH=\"${SRCDIR}/rs_test_res/upgrade_rulesets:\${FREECIV_DATA_PATH}\" \\"
  echo " ./rulesets_save.sh \$(cat \"${SRCDIR}/rs_test_res/upgrade_ruleset_list.txt\")"
) > $1

chmod +x "$1"
