1
0
Fork 0
mirror of https://github.com/aclist/dztui.git synced 2025-04-06 12:33:01 +02:00

Unlink legacy symlinks

This commit is contained in:
aclist 2022-06-22 23:44:37 +09:00 committed by GitHub
parent 6b5a904a62
commit 3836a50098
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -eo pipefail set -eo pipefail
version=0.7.0 version=0.7.1
release_url="https://raw.githubusercontent.com/aclist/dztui/main/dztui.sh" release_url="https://raw.githubusercontent.com/aclist/dztui/main/dztui.sh"
aid=221100 aid=221100
game="dayz" game="dayz"
@ -114,6 +114,13 @@ parse_json(){
encode(){ encode(){
echo "$1" | awk '{printf("%c",$1)}' | base64 | sed 's/\//_/g; s/=//g; s/+/]/g' 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(){ symlinks(){
for d in "$workshop_dir"/*; do for d in "$workshop_dir"/*; do
id=$(awk -F"= " '/publishedid/ {print $2}' "$d"/meta.cpp | awk -F\; '{print $1}') id=$(awk -F"= " '/publishedid/ {print $2}' "$d"/meta.cpp | awk -F\; '{print $1}')
@ -269,6 +276,7 @@ failed_mod_check(){
passed_mod_check(){ passed_mod_check(){
printf "[INFO] Mod check passed\n" printf "[INFO] Mod check passed\n"
connecting_to=$(echo -e "${tabled[$sel]}" | awk -F'\t' '{print $1,$2}') connecting_to=$(echo -e "${tabled[$sel]}" | awk -F'\t' '{print $1,$2}')
legacy_symlinks
symlinks symlinks
launch launch