X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fwine%2Freplace_wine_links.sh;fp=scripts%2Fwine%2Freplace_wine_links.sh;h=04765f380b17514d153c19f89516967faab765bd;hb=7b39f7e279005c8466ef508220a532ce2aa4abf8;hp=0000000000000000000000000000000000000000;hpb=3fbd372b35b15a19fb171d5ae34294ff7b1e6485;p=feisty_meow.git diff --git a/scripts/wine/replace_wine_links.sh b/scripts/wine/replace_wine_links.sh new file mode 100644 index 00000000..04765f38 --- /dev/null +++ b/scripts/wine/replace_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 apps +# 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" + +