From 1214051c3b32976aba514b67afef6cd6a115d199 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 28 Jan 2023 03:17:28 +0200 Subject: [PATCH 21/21] Meson: Set FREECIV_SCENARIO_PATH on run.sh See osdn #46582 Signed-off-by: Marko Lindqvist --- bootstrap/generate_meson_run.sh | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/bootstrap/generate_meson_run.sh b/bootstrap/generate_meson_run.sh index f0774d17f8..f8e0ceac34 100644 --- a/bootstrap/generate_meson_run.sh +++ b/bootstrap/generate_meson_run.sh @@ -1,6 +1,18 @@ #!/bin/bash +# Freeciv - Copyright (C) 2022 The Freeciv Team +# 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. + DATADIR="$(cd $(dirname $0)/../data ; pwd)" +SCENDIR="$(cd $(dirname $0)/../data/scenarios ; pwd)" echo "#!/bin/bash" > $1 echo "# Generated by $(basename $0)" >> $1 @@ -12,10 +24,17 @@ echo " exit" >> $1 echo "fi" >> $1 echo >> $1 echo "if test \"\$FREECIV_DATA_PATH\" = \"\" ; then" >> $1 -echo " export FREECIV_DATA_PATH=\"$DATADIR\"" >> $1 +echo " FREECIV_DATA_PATH=\"$DATADIR\"" >> $1 +echo "else" >> $1 +echo " FREECIV_DATA_PATH=\"\$FREECIV_DATA_PATH:$DATADIR\"" >> $1 +echo "fi" >> $1 +echo "export FREECIV_DATA_PATH" >> $1 +echo "if test \"\$FREECIV_SCENARIO_PATH\" = \"\" ; then" >> $1 +echo " FREECIV_SCENARIO_PATH=\"$SCENDIR\"" >> $1 echo "else" >> $1 -echo " export FREECIV_DATA_PATH=\"\$FREECIV_DATA_PATH:$DATADIR\"" >> $1 +echo " FREECIV_SCENARIO_PATH=\"\$FREECIV_SCENARIO_PATH:$SCENDIR\"" >> $1 echo "fi" >> $1 +echo "export FREECIV_SCENARIO_PATH" >> $1 echo >> $1 echo "./\$@" >> $1 -- 2.39.0