From 3836a50098e5eb912ee3410742a980ca72cd47d4 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Wed, 22 Jun 2022 23:44:37 +0900 Subject: [PATCH] Unlink legacy symlinks --- dztui.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dztui.sh b/dztui.sh index 2a9a507..b820c6d 100644 --- a/dztui.sh +++ b/dztui.sh @@ -1,6 +1,6 @@ #!/bin/bash set -eo pipefail -version=0.7.0 +version=0.7.1 release_url="https://raw.githubusercontent.com/aclist/dztui/main/dztui.sh" aid=221100 game="dayz" @@ -114,6 +114,13 @@ parse_json(){ encode(){ echo "$1" | awk '{printf("%c",$1)}' | base64 | sed 's/\//_/g; s/=//g; s/+/]/g' } +legacy_symlinks(){ + for d in "$game_dir"/*; do + if [[ $d =~ @[0-9]+-.+ ]]; then + unlink "$d" + fi + done +} symlinks(){ for d in "$workshop_dir"/*; do id=$(awk -F"= " '/publishedid/ {print $2}' "$d"/meta.cpp | awk -F\; '{print $1}') @@ -269,6 +276,7 @@ failed_mod_check(){ passed_mod_check(){ printf "[INFO] Mod check passed\n" connecting_to=$(echo -e "${tabled[$sel]}" | awk -F'\t' '{print $1,$2}') + legacy_symlinks symlinks launch