From 664199424b98d7bfbf4e068678da5e6e4db33f89 Mon Sep 17 00:00:00 2001 From: Stelios Tsampas Date: Sat, 18 May 2019 23:19:51 +0300 Subject: [PATCH] [util] Also test for symlinks when installing/uninstalling Fixes the broken `-f` test when dlls are linked to the prefix and they change name due to different crosscompilers (.dll, .dll.so) --- setup_dxvk.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup_dxvk.sh b/setup_dxvk.sh index f7828bea..01cebf7f 100644 --- a/setup_dxvk.sh +++ b/setup_dxvk.sh @@ -103,7 +103,7 @@ installFile() { fi if [ -n "$1" ]; then - if [ -f "${dstfile}" ]; then + if [ -f "${dstfile}" ] || [ -h "${dstfile}" ]; then if ! [ -f "${dstfile}.old" ]; then mv "${dstfile}" "${dstfile}.old" else @@ -132,7 +132,7 @@ uninstallFile() { return 1 fi - if ! [ -f "${dstfile}" ];then + if ! [ -f "${dstfile}" ] && ! [ -h "${dstfile}" ]; then echo "${dstfile}: File not found. Skipping." >&2 return 1 fi