This commit is contained in:
2022-05-14 11:27:13 +02:00
parent 4478307d70
commit df61d29d77

27
Run.sh
View File

@@ -5,6 +5,32 @@ OUTPUT_DIR="$2"
CFG_FILE="$3" CFG_FILE="$3"
DEFAULT_CFG_FILE=UnrealTournament.ini 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() { function install() {
rsync -a $SCRIPT_DIR/Help/ $OUTPUT_DIR/Help/ rsync -a $SCRIPT_DIR/Help/ $OUTPUT_DIR/Help/
@@ -14,6 +40,7 @@ function install() {
} }
function enable() { function enable() {
#todo: setup serverpackages
echo enable ok echo enable ok
} }