fix: added temporary backup making in case mods get deleted

This commit is contained in:
v4n
2025-03-19 23:01:18 +02:00
parent cb71852068
commit efe8720507
+4
View File
@@ -119,6 +119,10 @@ if [[ $latest_major -gt $installed_major ]]; then
search_dir="${HOME}"
target_dir="Steam/steamapps/common/Helldivers\ 2/data"
# make backup
log INFO "Creating a backup in case anything goes wrong."
h2mm export
# check if game directory is in ~/.config/h2mm/h2path
if [[ -f "$HOME/.config/h2mm/h2path" ]]; then
game_dir=$(cat "$HOME/.config/h2mm/h2path")