mirror of
https://github.com/aclist/dztui.git
synced 2024-12-29 13:52:03 +01:00
Hotfix for create_array
This commit is contained in:
parent
f2d0f88f3e
commit
ea2007357c
1 changed files with 3 additions and 4 deletions
7
dzgui.sh
7
dzgui.sh
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
version=2.4.0
|
version=2.4.1
|
||||||
aid=221100
|
aid=221100
|
||||||
game="dayz"
|
game="dayz"
|
||||||
workshop="steam://url/CommunityFilePage/"
|
workshop="steam://url/CommunityFilePage/"
|
||||||
|
@ -641,7 +641,7 @@ query_and_connect(){
|
||||||
parse_json <<< "$response"
|
parse_json <<< "$response"
|
||||||
#TODO: create logger function
|
#TODO: create logger function
|
||||||
echo "[DZGUI] Checking response time of servers"
|
echo "[DZGUI] Checking response time of servers"
|
||||||
create_array | zenity --progress --pulsate --title="DZGUI" --auto-close 2>/dev/null
|
create_array | zenity --width 500 --progress --pulsate --title="DZGUI" --auto-close 2>/dev/null
|
||||||
rc=$?
|
rc=$?
|
||||||
if [[ $rc -eq 1 ]]; then
|
if [[ $rc -eq 1 ]]; then
|
||||||
:
|
:
|
||||||
|
@ -720,7 +720,7 @@ create_array(){
|
||||||
name=$(echo "$line" | awk -F'\t' '{print $1}')
|
name=$(echo "$line" | awk -F'\t' '{print $1}')
|
||||||
#truncate names
|
#truncate names
|
||||||
if [[ $(echo "$name" | wc -m) -gt 50 ]]; then
|
if [[ $(echo "$name" | wc -m) -gt 50 ]]; then
|
||||||
name="$(echo $name | awk '{print substr($0,1,50) "..."}')"
|
name="$(echo "$name" | awk '{print substr($0,1,50) "..."}')"
|
||||||
else
|
else
|
||||||
:
|
:
|
||||||
fi
|
fi
|
||||||
|
@ -738,7 +738,6 @@ create_array(){
|
||||||
if [[ $delete -eq 1 ]]; then
|
if [[ $delete -eq 1 ]]; then
|
||||||
declare -g -a rows=("${rows[@]}" "$name" "$id")
|
declare -g -a rows=("${rows[@]}" "$name" "$id")
|
||||||
else
|
else
|
||||||
echo "$lc/$tc"
|
|
||||||
echo "# Checking ping: $lc/$tc"
|
echo "# Checking ping: $lc/$tc"
|
||||||
ping=$(check_ping "$line")
|
ping=$(check_ping "$line")
|
||||||
declare -g -a rows=("${rows[@]}" "$name" "$ip" "$players" "$time" "$stat" "$id" "$ping")
|
declare -g -a rows=("${rows[@]}" "$name" "$ip" "$players" "$time" "$stat" "$id" "$ping")
|
||||||
|
|
Loading…
Reference in a new issue