paths revised for more modern scheme
[feisty_meow.git] / scripts / wine / remake_wine_links.sh
1 #!/bin/bash
2
3 # fixes the links that wine makes to our home folder under linux.  that's a really bad
4 # practice that exposes all one's private files to the wine subsystem.  dumb.
5 # instead, this replaces those links to a local folder with things that the wine applications
6 # can't pooch up too much.  must be used within a wine user directory.  for example,
7 # i fix my directory '~/.PlayOnLinux/wineprefix/Steam/drive_c/users/fred' with this.
8
9 if [ ! -L "My Documents" -o ! -L "Desktop" ]; then
10   echo "This script is meant to be used in a user directory under wine."
11   echo "It will re-hook the links for the desktop and documents to a local folder"
12   echo "called '~/linx/wine_goods'"
13   exit 1
14 fi
15
16 \rm "Desktop" "My Documents" "My Pictures" "My Videos" "My Music"
17
18 if [ ! -d ~/linx/wine_goods ]; then
19   mkdir ~/linx/wine_goods
20 fi
21 if [ ! -d ~/linx/wine_goods/desktop ]; then
22   mkdir ~/linx/wine_goods/desktop
23 fi
24 if [ ! -d ~/linx/wine_goods/otherlinks ]; then
25   mkdir ~/linx/wine_goods/otherlinks
26 fi
27
28 ln -s ~/linx/wine_goods "My Documents"
29 ln -s ~/linx/wine_goods/desktop "Desktop"
30 ln -s ~/linx/wine_goods/otherlinks "My Pictures"
31 ln -s ~/linx/wine_goods/otherlinks "My Videos"
32 ln -s ~/linx/wine_goods/otherlinks "My Music"
33
34