From ae36690c9a8c82ebb466f9f72756a463dade74ec Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Sun, 24 Dec 2017 14:44:05 -0500 Subject: [PATCH] attempting to auto-fix wine link issues lower case and upper case names are sometimes sloppily used by the mod coders rather than the exact path, which causes problems on wine. --- scripts/wine/wine_link_maker.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 scripts/wine/wine_link_maker.sh diff --git a/scripts/wine/wine_link_maker.sh b/scripts/wine/wine_link_maker.sh new file mode 100644 index 00000000..743964e3 --- /dev/null +++ b/scripts/wine/wine_link_maker.sh @@ -0,0 +1,13 @@ + + +# find all the directories at this height. +find . -mindepth 1 -maxdepth 1 -type d -exec echo {} ';' >$TMP/filestolink.txt +# make links with all lower case and all upper case versions of the names. +while read line; do + ln -s "$line" "$(echo $line | tr '[:upper:]' '[:lower:]')" + ln -s "$line" "$(echo $line | tr '[:lower:]' '[:upper:]')" +done < $TMP/filestolink.txt +# remove dead links. +\rm $(find . -type l ! -exec test -e {} \; -print) + + -- 2.34.1