mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
Rewrite of bash system
+ Implemented new dashboard menu + some fixes for db_assembler + new module installation process with version check via json files + some fixes to modules installer + implemented simple crossplatform worldserver and authserver restarters + new compiler script + client data downloader (beta) + various other fixes
This commit is contained in:
@@ -6,56 +6,70 @@ source "$CURRENT_PATH/includes/includes.sh"
|
||||
|
||||
cmdopt=$1
|
||||
|
||||
while true
|
||||
do
|
||||
echo "===== DB ASSEMBLER MENU ====="
|
||||
PS3='Please enter your choice: '
|
||||
PS3='[Please enter your choice]: '
|
||||
options=(
|
||||
"Assemble ALL" "Assemble only bases" "Assemble only updates" "Assemble only customs"
|
||||
"Quit"
|
||||
"Assemble & import ALL" "Assemble & import only bases" "Assemble & import only updates" "Assemble & import only customs"
|
||||
"all: Assemble all" # 1
|
||||
"bases: Assemble only bases" # 2
|
||||
"updates: Assemble only updates" # 3
|
||||
"customs: Assemble only customs" # 4
|
||||
"import-all: Assemble & Import all" # 5
|
||||
"import-bases: Assemble & Import only bases" # 6
|
||||
"import-updates: Assemble & Import only updates" # 7
|
||||
"import-customs: Assemble & Import only customs" # 8
|
||||
"quit: Exit from this menu" # 9
|
||||
)
|
||||
|
||||
function _switch() {
|
||||
case $1 in
|
||||
"Assemble ALL")
|
||||
_reply="$1"
|
||||
_opt="$2"
|
||||
|
||||
case $_reply in
|
||||
""|"all"|"1")
|
||||
dbasm_run true true true
|
||||
;;
|
||||
"Assemble only bases")
|
||||
""|"bases"|"2")
|
||||
dbasm_run true false false
|
||||
;;
|
||||
"Assemble only updates")
|
||||
""|"updates"|"3")
|
||||
dbasm_run false true false
|
||||
;;
|
||||
"Assemble only customs")
|
||||
""|"customs"|"4")
|
||||
dbasm_run false false true
|
||||
;;
|
||||
"Assemble & import ALL")
|
||||
""|"import-all"|"5")
|
||||
dbasm_import true true true
|
||||
;;
|
||||
"Assemble & import only bases")
|
||||
""|"import-bases"|"6")
|
||||
dbasm_import true false false
|
||||
;;
|
||||
"Assemble & import only updates")
|
||||
""|"import-updates"|"7")
|
||||
dbasm_import false true false
|
||||
;;
|
||||
"Assemble & import only customs")
|
||||
""|"import-customs"|"8")
|
||||
dbasm_import false false true
|
||||
;;
|
||||
"Quit")
|
||||
""|"quit"|"9")
|
||||
echo "Goodbye!"
|
||||
exit
|
||||
;;
|
||||
*) echo invalid option;;
|
||||
""|"--help")
|
||||
echo "Available commands:"
|
||||
printf '%s\n' "${options[@]}"
|
||||
;;
|
||||
*) echo "invalid option, use --help option for the commands list";;
|
||||
esac
|
||||
}
|
||||
|
||||
# run option directly if specified in argument
|
||||
[ ! -z $1 ] && _switch "${options[$cmdopt-1]}" && exit 0
|
||||
|
||||
select opt in "${options[@]}"
|
||||
while true
|
||||
do
|
||||
_switch "$opt"
|
||||
break
|
||||
done
|
||||
# run option directly if specified in argument
|
||||
[ ! -z $1 ] && _switch $@
|
||||
[ ! -z $1 ] && exit 0
|
||||
|
||||
select opt in "${options[@]}"
|
||||
do
|
||||
echo "===== DB ASSEMBLER MENU ====="
|
||||
_switch $REPLY
|
||||
break
|
||||
done
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user