Daniel Gibbs
3 years ago
No known key found for this signature in database
GPG Key ID: 7CA38B43F78F12FE
4 changed files with
39 additions and
2 deletions
-
lgsm/modules/command_dev_details.sh
-
lgsm/modules/core_getopt.sh
-
lgsm/modules/core_modules.sh
-
lgsm/modules/info_game.sh
|
|
@ -0,0 +1,30 @@ |
|
|
|
#!/bin/bash |
|
|
|
# LinuxGSM command_dev_debug.sh module |
|
|
|
# Author: Daniel Gibbs |
|
|
|
# Contributors: http://linuxgsm.com/contrib |
|
|
|
# Website: https://linuxgsm.com |
|
|
|
# Description: Dev only: Displays all parsed details. |
|
|
|
|
|
|
|
echo -e "" |
|
|
|
echo -e "${lightgreen}Details List${default}" |
|
|
|
echo -e "==================================================================" |
|
|
|
echo -e "" |
|
|
|
echo -e "Game: ${gamename}" |
|
|
|
echo -e "Short Name: ${shortname}" |
|
|
|
echo -e "Directory: ${rootdir}" |
|
|
|
echo -e "Binary: ${executable}" |
|
|
|
echo -e "Config: ${servercfgfullpath}" |
|
|
|
echo -e "Port: ${port}" |
|
|
|
echo -e "Query Port: ${queryport}" |
|
|
|
|
|
|
|
echo -e "Servername: ${servername}" |
|
|
|
echo -e "Server Password: ${serverpassword}" |
|
|
|
echo -e "RCON Password: ${rconpassword}" |
|
|
|
echo -e "Admin Password: ${adminpassword}" |
|
|
|
echo -e "Maxplayers: ${maxplayers}" |
|
|
|
echo -e "Tickrate: ${tickrate}" |
|
|
|
echo -e "Default Map: ${defaultmap}" |
|
|
|
echo -e "Game Mode: ${gamemode}" |
|
|
|
echo -e "RCON Enabled: ${rconenabled}" |
|
|
|
echo -e "RCON Password: ${rconpassword}" |
|
|
|
echo -e "Config IP: ${configip}" |
|
|
@ -50,6 +50,7 @@ cmd_install_squad_license=("li;license" "install_squad_license.sh" "Add your Squ |
|
|
|
cmd_fastdl=("fd;fastdl" "command_fastdl.sh" "Build a FastDL directory.") |
|
|
|
# Dev commands. |
|
|
|
cmd_dev_debug=("dev;developer" "command_dev_debug.sh" "Enable developer Mode.") |
|
|
|
cmd_dev_details=("ddt;detect-details" "command_dev_details.sh" "Display parsed details.") |
|
|
|
cmd_dev_detect_deps=("dd;detect-deps" "command_dev_detect_deps.sh" "Detect required dependencies.") |
|
|
|
cmd_dev_detect_glibc=("dg;detect-glibc" "command_dev_detect_glibc.sh" "Detect required glibc.") |
|
|
|
cmd_dev_detect_ldd=("dl;detect-ldd" "command_dev_detect_ldd.sh" "Detect required dynamic dependencies.") |
|
|
@ -145,7 +146,7 @@ currentopt+=("${cmd_install[@]}" "${cmd_auto_install[@]}") |
|
|
|
## Developer commands. |
|
|
|
currentopt+=("${cmd_dev_debug[@]}") |
|
|
|
if [ -f ".dev-debug" ]; then |
|
|
|
currentopt+=("${cmd_dev_detect_deps[@]}" "${cmd_dev_detect_glibc[@]}" "${cmd_dev_detect_ldd[@]}" "${cmd_dev_query_raw[@]}" "${cmd_dev_clear_modules[@]}") |
|
|
|
currentopt+=("${cmd_dev_details[@]}" "${cmd_dev_detect_deps[@]}" "${cmd_dev_detect_glibc[@]}" "${cmd_dev_detect_ldd[@]}" "${cmd_dev_query_raw[@]}" "${cmd_dev_clear_modules[@]}") |
|
|
|
fi |
|
|
|
|
|
|
|
## Sponsor. |
|
|
|
|
|
@ -299,6 +299,11 @@ command_dev_debug.sh() { |
|
|
|
fn_fetch_module |
|
|
|
} |
|
|
|
|
|
|
|
command_dev_details.sh() { |
|
|
|
modulefile="${FUNCNAME[0]}" |
|
|
|
fn_fetch_module |
|
|
|
} |
|
|
|
|
|
|
|
command_dev_detect_deps.sh() { |
|
|
|
modulefile="${FUNCNAME[0]}" |
|
|
|
fn_fetch_module |
|
|
|
|
|
@ -17,6 +17,7 @@ modulesselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
|
|
|
|
# Config Type: ini |
|
|
|
# Comment: ; or # |
|
|
|
# Note: this ini filter does not filter by section. Can cause issues with some games that have multiple sections with the same variable name. |
|
|
|
fn_info_game_ini() { |
|
|
|
# sed is used to process the file. |
|
|
|
# -n option tells sed to suppress output by default. |
|
|
@ -28,7 +29,7 @@ fn_info_game_ini() { |
|
|
|
if [ -n "${3}" ]; then |
|
|
|
servercfgfullpath="${3}" |
|
|
|
fi |
|
|
|
eval "${1}"="$(sed -n "/^[[:space:]]*${2}/ { s/.*= *//p; q }" "${servercfgfullpath}")" |
|
|
|
eval "${1}"="$(sed -n "/^[[:space:]]*\<${2}\>/ { s/.*= *//p;q }" "${servercfgfullpath}")" |
|
|
|
} |
|
|
|
|
|
|
|
# Config Type: QuakeC |
|
|
|