mirror of
https://github.com/aclist/dztui.git
synced 2025-04-08 13:33:00 +02:00
Add extended debug options
This commit is contained in:
parent
5539dd4eec
commit
69dec73c6d
1 changed files with 32 additions and 1 deletions
33
dztui.sh
33
dztui.sh
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
version=0.6.0
|
version=0.7.0
|
||||||
release_url="https://raw.githubusercontent.com/aclist/dztui/main/dztui.sh"
|
release_url="https://raw.githubusercontent.com/aclist/dztui/main/dztui.sh"
|
||||||
aid=221100
|
aid=221100
|
||||||
game="dayz"
|
game="dayz"
|
||||||
|
@ -359,6 +359,9 @@ menu(){
|
||||||
printf "f$separator Launch favorite\n"
|
printf "f$separator Launch favorite\n"
|
||||||
printf "l$separator List installed mods\n"
|
printf "l$separator List installed mods\n"
|
||||||
printf "r$separator Refresh\n"
|
printf "r$separator Refresh\n"
|
||||||
|
if [[ $debug -eq 1 ]]; then
|
||||||
|
printf "d$separator Debug options\n"
|
||||||
|
fi
|
||||||
printf "q$separator Quit\n"
|
printf "q$separator Quit\n"
|
||||||
printf "\n"
|
printf "\n"
|
||||||
}
|
}
|
||||||
|
@ -370,6 +373,33 @@ forced_exit(){
|
||||||
printf "\n"
|
printf "\n"
|
||||||
exit_msg
|
exit_msg
|
||||||
}
|
}
|
||||||
|
list_mod_names(){
|
||||||
|
cd $game_dir
|
||||||
|
for i in $(find * -maxdepth 1 -type l); do
|
||||||
|
awk -F"[=;]" -v var="$i" '{OFS="\t"}/name/ {a=$2}END{print var,a}' "$i"/meta.cpp \
|
||||||
|
| sed 's/;$//g'
|
||||||
|
done | column -t -s$'\t' -o$'\t' | less
|
||||||
|
}
|
||||||
|
debug_options(){
|
||||||
|
if [[ $debug -eq 1 ]]; then
|
||||||
|
while true; do
|
||||||
|
printf "\n"
|
||||||
|
printf "1$separator List human readable mod paths\n"
|
||||||
|
printf "q$separator Back\n"
|
||||||
|
printf "\n"
|
||||||
|
read -p "Selection: " option
|
||||||
|
if [[ $option == 1 ]]; then
|
||||||
|
list_mod_names
|
||||||
|
elif [[ $option == q ]]; then
|
||||||
|
return
|
||||||
|
else
|
||||||
|
:
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
else
|
||||||
|
:
|
||||||
|
fi
|
||||||
|
}
|
||||||
main(){
|
main(){
|
||||||
checks
|
checks
|
||||||
init_table
|
init_table
|
||||||
|
@ -389,6 +419,7 @@ main(){
|
||||||
r) init_table ;;
|
r) init_table ;;
|
||||||
f) launch_fav ;;
|
f) launch_fav ;;
|
||||||
l) list_mods ;;
|
l) list_mods ;;
|
||||||
|
d) debug_options;;
|
||||||
q) exit_msg ;;
|
q) exit_msg ;;
|
||||||
*) : ;;
|
*) : ;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue