1
0
Fork 0
mirror of https://github.com/aclist/dztui.git synced 2025-01-01 15:12:05 +01:00

fix: remove duplicates

This commit is contained in:
aclist 2024-01-25 15:29:12 +09:00
parent e2781c07cf
commit 9b84a168b8
3 changed files with 12 additions and 8 deletions

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -o pipefail set -o pipefail
version=5.0.0.rc-32 version=5.0.0.rc-33
#CONSTANTS #CONSTANTS
aid=221100 aid=221100
@ -536,10 +536,10 @@ fetch_dzq(){
fetch_helpers_by_sum(){ fetch_helpers_by_sum(){
declare -A sums declare -A sums
sums=( sums=(
["ui.py"]="34dc74d1330932e36087d2b52e0e42eb" ["ui.py"]="24c16220d76b5fb8c6964648d509d684"
["query_v2.py"]="1822bd1769ce7d7cb0d686a60f9fa197" ["query_v2.py"]="1822bd1769ce7d7cb0d686a60f9fa197"
["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397"
["funcs"]="ae54854dfb45804c92a81f4b95bf3c54" ["funcs"]="91144c992c4786c855da659f384caebd"
) )
local author="aclist" local author="aclist"
local repo="dztui" local repo="dztui"

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -o pipefail set -o pipefail
version=5.0.0.rc-32 version=5.0.0.rc-33
#CONSTANTS #CONSTANTS
aid=221100 aid=221100
@ -1187,6 +1187,10 @@ check_timestamps(){
} }
merge_modlists(){ merge_modlists(){
local diff="$1" local diff="$1"
_sort(){
printf "%s\n" "$diff"
printf "%s\n" "${needs_update[@]}"
}
readarray -t needs_update < <(check_timestamps) readarray -t needs_update < <(check_timestamps)
if [[ ${#needs_update[@]} -eq 0 ]]; then if [[ ${#needs_update[@]} -eq 0 ]]; then
echo "$diff" echo "$diff"
@ -1195,8 +1199,8 @@ merge_modlists(){
if [[ -z "$diff" ]] && [[ ${#needs_update[@]} -gt 0 ]]; then if [[ -z "$diff" ]] && [[ ${#needs_update[@]} -gt 0 ]]; then
printf "%s\n" "${needs_update[@]}" printf "%s\n" "${needs_update[@]}"
else else
printf "%s\n" "$diff" # remove duplicates
printf "%s\n" "${needs_update[@]}" _sort | sort -u
fi fi
} }
concat_mods(){ concat_mods(){
@ -1306,7 +1310,7 @@ manual_mod_install(){
if [[ -z $diff ]]; then if [[ -z $diff ]]; then
launch "$ip" "$gameport" "$sanitized_mods" launch "$ip" "$gameport" "$sanitized_mods"
else 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 exit 1
fi fi
} }

View file

@ -16,7 +16,7 @@ locale.setlocale(locale.LC_ALL, '')
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, GLib, Gdk, GObject, Pango from gi.repository import Gtk, GLib, Gdk, GObject, Pango
# 5.0.0-rc.32 # 5.0.0-rc.33
app_name = "DZGUI" app_name = "DZGUI"
cache = {} cache = {}