From a52fba8c37e636c59774aedaca8f79f8f61b07c2 Mon Sep 17 00:00:00 2001 From: chacha <1000chacha0001@gmail.com> Date: Sun, 24 Jul 2022 18:43:35 +0000 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Run.sh'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Run.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Run.sh b/Run.sh index f6dc506..7f3f80b 100755 --- a/Run.sh +++ b/Run.sh @@ -4,26 +4,26 @@ OUTPUT_DIR="$2" CFG_FILE="$3" DEFAULT_CFG_FILE=UnrealTournament.ini function add_iniKeyEx() { - crudini --set $OUTPUT_DIR/System/$1 $2 __$3 $4 + crudini --set $OUTPUT_DIR/System/$1 "$2" __"$3" "$4" # Warning: ugly hack with sed to allow multiple key instances + to remove space around '=' sed -i "s/[[:space:]]*__$(echo $3 | sed -e 's/\([[\/.*]\|\]\)/\\&/g')[[:space:]]*=[[:space:]]*/$(echo $3 | sed -e 's/\([[\/.*]\|\]\)/\\&/g')=/g" $OUTPUT_DIR/System/$1 } function set_iniKeyEx() { - crudini --set $OUTPUT_DIR/System/$1 $2 $3 $4 + crudini --set $OUTPUT_DIR/System/$1 "$2" "$3" "$4" } # !!Warning!! section is not considered function del_iniKeyEx() { sed -i "/[[:space:]]*$(echo $3 | sed -e 's/\([[\/.*]\|\]\)/\\&/g')[[:space:]]*=[[:space:]]*$(echo $4 | sed -e 's/\([[\/.*]\|\]\)/\\&/g')/d" $OUTPUT_DIR/System/$1 } function add_iniKey() { - add_iniKeyEx $CFG_FILE $1 $2 $3 + add_iniKeyEx $CFG_FILE "$1" "$2" "$3" } function set_iniKey() { - set_iniKeyEx $CFG_FILE $1 $2 $3 + set_iniKeyEx $CFG_FILE "$1" "$2" "$3" } # !!Warning!! section is not considered function del_iniKey() { - del_iniKeyEx $CFG_FILE $1 $2 $3 + del_iniKeyEx $CFG_FILE "$1" "$2" "$3" } function add_ServerPackage() { add_iniKey 'Engine.GameEngine' ServerPackages "$1"