Mise à jour de 'Run.sh'
This commit is contained in:
26
Run.sh
26
Run.sh
@@ -35,7 +35,11 @@ function del_ServerActors() {
|
||||
del_iniKey 'Engine.GameEngine' ServerActors $1
|
||||
del_iniKey 'XC_Engine.XC_GameEngine' ServerActors $1
|
||||
}
|
||||
|
||||
function getmodprefix() {
|
||||
UFile=$(find $OUTPUT_DIR/System -type f -iname "SmartSB*.u" -exec basename {} \;)
|
||||
BaseName="${UFile%.*}"
|
||||
echo "$BaseName"
|
||||
}
|
||||
function install() {
|
||||
rsync -a $SCRIPT_DIR/Help/ $OUTPUT_DIR/Help/ --exclude '.git'
|
||||
rsync -a $SCRIPT_DIR/System/ $OUTPUT_DIR/System/ --exclude '.git'
|
||||
@@ -45,12 +49,11 @@ function install() {
|
||||
}
|
||||
|
||||
function enable() {
|
||||
SSBUFile=$(find $OUTPUT_DIR/System -type f -iname "SmartSB*.u" ! -name "SmartSBStats.u" -exec basename {} \;)
|
||||
SSBBaseName="${SSBUFile%.*}"
|
||||
BaseName="$(getmodprefix)"
|
||||
|
||||
add_ServerPackage $SSBBaseName
|
||||
add_ServerPackage $BaseName
|
||||
add_ServerPackage SmartSBStats
|
||||
add_ServerActors $SSBBaseName.SmartSBServerActor
|
||||
add_ServerActors $BaseName.SmartSBServerActor
|
||||
|
||||
#todo: config SSB ?
|
||||
|
||||
@@ -58,19 +61,18 @@ function enable() {
|
||||
}
|
||||
|
||||
function disable() {
|
||||
SSBUFile=$(find $OUTPUT_DIR/System -type f -iname "SmartSB*.u" ! -name "SmartSBStats.u" -exec basename {} \;)
|
||||
SSBBaseName="${SSBUFile%.*}"
|
||||
BaseName="$(getmodprefix)"
|
||||
|
||||
del_ServerPackage $SSBBaseName
|
||||
del_ServerPackage $BaseName
|
||||
del_ServerPackage SmartSBStats
|
||||
del_ServerActors $SSBBaseName.SmartSBServerActor
|
||||
del_ServerActors $BaseName.SmartSBServerActor
|
||||
|
||||
echo disable ok
|
||||
}
|
||||
|
||||
function show_help() {
|
||||
echo
|
||||
echo "Usage: $0 { install | enable | disable } <UT99_INSTALL_DIR> [<UT99_CONFIG_FILE>]"
|
||||
echo "Usage: $0 { getmodprefix | install | enable | disable } <UT99_INSTALL_DIR> [<UT99_CONFIG_FILE>]"
|
||||
echo
|
||||
}
|
||||
|
||||
@@ -102,6 +104,10 @@ function check_game_dir() {
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
'getmodprefix')
|
||||
check_game_dir
|
||||
getmodprefix
|
||||
;;
|
||||
'install')
|
||||
check_game_dir
|
||||
install
|
||||
|
||||
Reference in New Issue
Block a user