From ea2007357c4efc45d2131c1eff286e50560e9845 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Wed, 10 Aug 2022 08:51:30 +0900 Subject: [PATCH] Hotfix for create_array --- dzgui.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dzgui.sh b/dzgui.sh index b180783..020d7f1 100644 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/bin/bash set -o pipefail -version=2.4.0 +version=2.4.1 aid=221100 game="dayz" workshop="steam://url/CommunityFilePage/" @@ -641,7 +641,7 @@ query_and_connect(){ parse_json <<< "$response" #TODO: create logger function 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=$? if [[ $rc -eq 1 ]]; then : @@ -720,7 +720,7 @@ create_array(){ name=$(echo "$line" | awk -F'\t' '{print $1}') #truncate names 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 : fi @@ -738,7 +738,6 @@ create_array(){ if [[ $delete -eq 1 ]]; then declare -g -a rows=("${rows[@]}" "$name" "$id") else - echo "$lc/$tc" echo "# Checking ping: $lc/$tc" ping=$(check_ping "$line") declare -g -a rows=("${rows[@]}" "$name" "$ip" "$players" "$time" "$stat" "$id" "$ping")