From 9b7e009540f05be7706c56a58b3a6663beb3a087 Mon Sep 17 00:00:00 2001 From: v4n <105587619+v4n00@users.noreply.github.com> Date: Wed, 15 Jan 2025 16:57:17 +0200 Subject: [PATCH] fix: install logic for unsorted files --- h2mm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/h2mm b/h2mm index 893b7c3..3aaf3b3 100755 --- a/h2mm +++ b/h2mm @@ -1,5 +1,5 @@ #!/bin/bash -# Helldivers 2 Mod Manager v0.1.1 +# Helldivers 2 Mod Manager v0.1.3 # --- Globals --- @@ -255,7 +255,8 @@ function mod_install() { done declare -A patch_count # hash table - in case multiple named files are needed for 1 mod install, store the patch count - target_files=() + target_files=() # store the target files so we can put them in the database later + mod_files=($(printf "%s\n" "${mod_files[@]}" | sort -t. -k1,1 -k2,2n)) # sort the mod files because with the below logic, the .stream and .gpu_resources files need to come after their respective patch files for file in "${mod_files[@]}"; do base_name=$(get_basename "$file") patch_prefix="$MODS_DIR/${base_name}.patch_"