From: Chris Koeritz Date: Fri, 1 Jun 2018 20:06:07 +0000 (-0400) Subject: dropping unused link maker, renaming replacer X-Git-Tag: 2.140.114^2~17 X-Git-Url: https://feistymeow.org/gitweb/?p=feisty_meow.git;a=commitdiff_plain;h=8c349a38d121683c7ca2eccd3ba57e41ddcf299d dropping unused link maker, renaming replacer --- diff --git a/scripts/wine/remake_wine_links.sh b/scripts/wine/remake_wine_links.sh new file mode 100644 index 00000000..a40f2877 --- /dev/null +++ b/scripts/wine/remake_wine_links.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +# fixes the links that wine makes to our home folder under linux. that's a really bad +# practice that exposes all one's private files to the wine subsystem. dumb. +# instead, this replaces those links to a local folder with things that the wine applications +# can't pooch up too much. must be used within a wine user directory. for example, +# i fix my directory '~/.PlayOnLinux/wineprefix/Steam/drive_c/users/fred' with this. + +if [ ! -L "My Documents" -o ! -L "Desktop" ]; then + echo "This script is meant to be used in a user directory under wine." + echo "It will re-hook the links for the desktop and documents to a local folder" + echo "called '~/wine_goods'" + exit 1 +fi + +\rm "Desktop" "My Documents" "My Pictures" "My Videos" "My Music" + +if [ ! -d ~/wine_goods ]; then + mkdir ~/wine_goods +fi +if [ ! -d ~/wine_goods/desktop ]; then + mkdir ~/wine_goods/desktop +fi +if [ ! -d ~/wine_goods/otherlinks ]; then + mkdir ~/wine_goods/otherlinks +fi + +ln -s ~/wine_goods "My Documents" +ln -s ~/wine_goods/desktop "Desktop" +ln -s ~/wine_goods/otherlinks "My Pictures" +ln -s ~/wine_goods/otherlinks "My Videos" +ln -s ~/wine_goods/otherlinks "My Music" + + diff --git a/scripts/wine/replace_wine_links.sh b/scripts/wine/replace_wine_links.sh deleted file mode 100644 index a40f2877..00000000 --- a/scripts/wine/replace_wine_links.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -# fixes the links that wine makes to our home folder under linux. that's a really bad -# practice that exposes all one's private files to the wine subsystem. dumb. -# instead, this replaces those links to a local folder with things that the wine applications -# can't pooch up too much. must be used within a wine user directory. for example, -# i fix my directory '~/.PlayOnLinux/wineprefix/Steam/drive_c/users/fred' with this. - -if [ ! -L "My Documents" -o ! -L "Desktop" ]; then - echo "This script is meant to be used in a user directory under wine." - echo "It will re-hook the links for the desktop and documents to a local folder" - echo "called '~/wine_goods'" - exit 1 -fi - -\rm "Desktop" "My Documents" "My Pictures" "My Videos" "My Music" - -if [ ! -d ~/wine_goods ]; then - mkdir ~/wine_goods -fi -if [ ! -d ~/wine_goods/desktop ]; then - mkdir ~/wine_goods/desktop -fi -if [ ! -d ~/wine_goods/otherlinks ]; then - mkdir ~/wine_goods/otherlinks -fi - -ln -s ~/wine_goods "My Documents" -ln -s ~/wine_goods/desktop "Desktop" -ln -s ~/wine_goods/otherlinks "My Pictures" -ln -s ~/wine_goods/otherlinks "My Videos" -ln -s ~/wine_goods/otherlinks "My Music" - - diff --git a/scripts/wine/wine_link_maker.sh b/scripts/wine/wine_link_maker.sh deleted file mode 100644 index 743964e3..00000000 --- a/scripts/wine/wine_link_maker.sh +++ /dev/null @@ -1,13 +0,0 @@ - - -# 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) - -