From 9b84a168b8c8c99ce51237d226519e3c86960759 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 25 Jan 2024 15:29:12 +0900 Subject: [PATCH] fix: remove duplicates --- dzgui.sh | 6 +++--- helpers/funcs | 12 ++++++++---- helpers/ui.py | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/dzgui.sh b/dzgui.sh index f6ffe7a..7b9e593 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o pipefail -version=5.0.0.rc-32 +version=5.0.0.rc-33 #CONSTANTS aid=221100 @@ -536,10 +536,10 @@ fetch_dzq(){ fetch_helpers_by_sum(){ declare -A sums sums=( - ["ui.py"]="34dc74d1330932e36087d2b52e0e42eb" + ["ui.py"]="24c16220d76b5fb8c6964648d509d684" ["query_v2.py"]="1822bd1769ce7d7cb0d686a60f9fa197" ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" - ["funcs"]="ae54854dfb45804c92a81f4b95bf3c54" + ["funcs"]="91144c992c4786c855da659f384caebd" ) local author="aclist" local repo="dztui" diff --git a/helpers/funcs b/helpers/funcs index 74b8921..b4ac4ea 100755 --- a/helpers/funcs +++ b/helpers/funcs @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -o pipefail -version=5.0.0.rc-32 +version=5.0.0.rc-33 #CONSTANTS aid=221100 @@ -1187,6 +1187,10 @@ check_timestamps(){ } merge_modlists(){ local diff="$1" + _sort(){ + printf "%s\n" "$diff" + printf "%s\n" "${needs_update[@]}" + } readarray -t needs_update < <(check_timestamps) if [[ ${#needs_update[@]} -eq 0 ]]; then echo "$diff" @@ -1195,8 +1199,8 @@ merge_modlists(){ if [[ -z "$diff" ]] && [[ ${#needs_update[@]} -gt 0 ]]; then printf "%s\n" "${needs_update[@]}" else - printf "%s\n" "$diff" - printf "%s\n" "${needs_update[@]}" + # remove duplicates + _sort | sort -u fi } concat_mods(){ @@ -1306,7 +1310,7 @@ manual_mod_install(){ if [[ -z $diff ]]; then launch "$ip" "$gameport" "$sanitized_mods" else - printf "Some mods may have failed to download. Try connecting again to resync." + printf "User aborted download process, or some mods may have failed to download. Try connecting again to resync." exit 1 fi } diff --git a/helpers/ui.py b/helpers/ui.py index 26d4ce6..1b5e0f2 100644 --- a/helpers/ui.py +++ b/helpers/ui.py @@ -16,7 +16,7 @@ locale.setlocale(locale.LC_ALL, '') gi.require_version("Gtk", "3.0") from gi.repository import Gtk, GLib, Gdk, GObject, Pango -# 5.0.0-rc.32 +# 5.0.0-rc.33 app_name = "DZGUI" cache = {}