This commit is contained in:
2022-05-14 11:28:56 +02:00
parent dcf5815200
commit e1dbe24508

26
Run.sh
View File

@@ -5,6 +5,32 @@ OUTPUT_DIR="$2"
CFG_FILE="$3"
DEFAULT_CFG_FILE=UnrealTournament.ini
function add_iniKey() {
crudini --set $OUTPUT_DIR/System/$CFG_FILE $1 __$2 $3
# Warning: ugly hack with sed to allow multiple key instances + to remove space around '='
sed -i "s/[[:space:]]*__$2[[:space:]]*=[[:space:]]*/$2=/g" $OUTPUT_DIR/System/$CFG_FILE
}
# !!Warning!! section is not considered
function del_iniKey() {
sed -i "/[[:space:]]*$2[[:space:]]*=[[:space:]]*$3/d" $OUTPUT_DIR/System/$CFG_FILE
}
function add_ServerPackage() {
add_iniKey 'Engine.GameEngine' ServerPackages $1
}
function del_ServerPackage() {
del_iniKey 'Engine.GameEngine' ServerPackages $1
}
function add_ServerActors() {
add_iniKey 'Engine.GameEngine' ServerActors $1
}
function del_ServerActors() {
del_iniKey 'Engine.GameEngine' ServerActors $1
}
function install() {
rsync -a $SCRIPT_DIR/Help/ $OUTPUT_DIR/Help