Mise à jour de 'Run.sh'
add new method: getmodprefix
This commit is contained in:
54
Run.sh
54
Run.sh
@@ -36,6 +36,12 @@ function del_ServerActors() {
|
|||||||
del_iniKey 'XC_Engine.XC_GameEngine' ServerActors $1
|
del_iniKey 'XC_Engine.XC_GameEngine' ServerActors $1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getmodprefix() {
|
||||||
|
UNUFile=$(find $OUTPUT_DIR/System -type f -name "UN*.u" -exec basename {} \;)
|
||||||
|
UNBaseName="${UNUFile%.*}"
|
||||||
|
echo $UNBaseName
|
||||||
|
}
|
||||||
|
|
||||||
function install() {
|
function install() {
|
||||||
rsync -a $SCRIPT_DIR/Help/ $OUTPUT_DIR/Help --exclude '.git'
|
rsync -a $SCRIPT_DIR/Help/ $OUTPUT_DIR/Help --exclude '.git'
|
||||||
rsync -a $SCRIPT_DIR/System/ $OUTPUT_DIR/System --exclude '.git'
|
rsync -a $SCRIPT_DIR/System/ $OUTPUT_DIR/System --exclude '.git'
|
||||||
@@ -44,8 +50,7 @@ function install() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function enable() {
|
function enable() {
|
||||||
UNUFile=$(find $OUTPUT_DIR/System -type f -name "UN*.u" -exec basename {} \;)
|
UNBaseName=getmodprefix()
|
||||||
UNBaseName="${UNUFile%.*}"
|
|
||||||
|
|
||||||
VAUFile=$(find $OUTPUT_DIR/System -type f -name "VAH*.u" -exec basename {} \;)
|
VAUFile=$(find $OUTPUT_DIR/System -type f -name "VAH*.u" -exec basename {} \;)
|
||||||
VABaseName="${VAUFile%.*}"
|
VABaseName="${VAUFile%.*}"
|
||||||
@@ -58,8 +63,7 @@ function enable() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function disable() {
|
function disable() {
|
||||||
UNUFile=$(find $OUTPUT_DIR/System -type f -name "UN*.u" -exec basename {} \;)
|
UNBaseName=getmodprefix()
|
||||||
UNBaseName="${UNUFile%.*}"
|
|
||||||
|
|
||||||
VAUFile=$(find $OUTPUT_DIR/System -type f -name "VAH*.u" -exec basename {} \;)
|
VAUFile=$(find $OUTPUT_DIR/System -type f -name "VAH*.u" -exec basename {} \;)
|
||||||
VABaseName="${VAUFile%.*}"
|
VABaseName="${VAUFile%.*}"
|
||||||
@@ -72,63 +76,45 @@ function disable() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function enableCG() {
|
function enableCG() {
|
||||||
UNUFile=$(find $OUTPUT_DIR/System -type f -name "UN*.u" -exec basename {} \;)
|
UNBaseName=getmodprefix()
|
||||||
UNBaseName="${UNUFile%.*}"
|
add_ServerActors $UNBaseName.NewNetCG
|
||||||
|
|
||||||
add_ServerActors $UNBaseName.NewNetCG
|
|
||||||
|
|
||||||
echo enable ok
|
echo enable ok
|
||||||
}
|
}
|
||||||
|
|
||||||
function disableCG() {
|
function disableCG() {
|
||||||
UNUFile=$(find $OUTPUT_DIR/System -type f -name "UN*.u" -exec basename {} \;)
|
UNBaseName=getmodprefix()
|
||||||
UNBaseName="${UNUFile%.*}"
|
|
||||||
|
|
||||||
del_ServerActors $UNBaseName.NewNetCG
|
del_ServerActors $UNBaseName.NewNetCG
|
||||||
|
|
||||||
echo disable ok
|
echo disable ok
|
||||||
}
|
}
|
||||||
|
|
||||||
function enableDJ() {
|
function enableDJ() {
|
||||||
UNUFile=$(find $OUTPUT_DIR/System -type f -name "UN*.u" -exec basename {} \;)
|
UNBaseName=getmodprefix()
|
||||||
UNBaseName="${UNUFile%.*}"
|
add_ServerActors $UNBaseName.DoubleJump
|
||||||
|
|
||||||
add_ServerActors $UNBaseName.DoubleJump
|
|
||||||
|
|
||||||
echo enable ok
|
echo enable ok
|
||||||
}
|
}
|
||||||
|
|
||||||
function disableDJ() {
|
function disableDJ() {
|
||||||
UNUFile=$(find $OUTPUT_DIR/System -type f -name "UN*.u" -exec basename {} \;)
|
UNBaseName=getmodprefix()
|
||||||
UNBaseName="${UNUFile%.*}"
|
|
||||||
|
|
||||||
del_ServerActors $UNBaseName.DoubleJump
|
del_ServerActors $UNBaseName.DoubleJump
|
||||||
|
|
||||||
echo disable ok
|
echo disable ok
|
||||||
}
|
}
|
||||||
|
|
||||||
function enableGM() {
|
function enableGM() {
|
||||||
UNUFile=$(find $OUTPUT_DIR/System -type f -name "UN*.u" -exec basename {} \;)
|
UNBaseName=getmodprefix()
|
||||||
UNBaseName="${UNUFile%.*}"
|
add_ServerActors $UNBaseName.GrapMut
|
||||||
|
|
||||||
add_ServerActors $UNBaseName.GrapMut
|
|
||||||
|
|
||||||
echo enable ok
|
echo enable ok
|
||||||
}
|
}
|
||||||
|
|
||||||
function disableGM() {
|
function disableGM() {
|
||||||
UNUFile=$(find $OUTPUT_DIR/System -type f -name "UN*.u" -exec basename {} \;)
|
UNBaseName=getmodprefix()
|
||||||
UNBaseName="${UNUFile%.*}"
|
|
||||||
|
|
||||||
del_ServerActors $UNBaseName.GrapMut
|
del_ServerActors $UNBaseName.GrapMut
|
||||||
|
|
||||||
echo disable ok
|
echo disable ok
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function show_help() {
|
function show_help() {
|
||||||
echo
|
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 " $0 { enableCG | disableCG } <UT99_INSTALL_DIR> [<UT99_CONFIG_FILE>]"
|
echo " $0 { enableCG | disableCG } <UT99_INSTALL_DIR> [<UT99_CONFIG_FILE>]"
|
||||||
echo " $0 { enableDJ | disableDJ } <UT99_INSTALL_DIR> [<UT99_CONFIG_FILE>]"
|
echo " $0 { enableDJ | disableDJ } <UT99_INSTALL_DIR> [<UT99_CONFIG_FILE>]"
|
||||||
echo " $0 { enableGM | disableGM } <UT99_INSTALL_DIR> [<UT99_CONFIG_FILE>]"
|
echo " $0 { enableGM | disableGM } <UT99_INSTALL_DIR> [<UT99_CONFIG_FILE>]"
|
||||||
@@ -163,6 +149,10 @@ function check_game_dir() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
'getmodprefix')
|
||||||
|
check_game_dir
|
||||||
|
getmodprefix
|
||||||
|
;;
|
||||||
'install')
|
'install')
|
||||||
check_game_dir
|
check_game_dir
|
||||||
install
|
install
|
||||||
|
|||||||
Reference in New Issue
Block a user