]> git.rmz.io Git - dotfiles.git/commitdiff
Revert "only set HOME in wine"
authorSamir Benmendil <ram-z@chakra-project.org>
Sat, 3 Nov 2012 16:16:02 +0000 (17:16 +0100)
committerSamir Benmendil <ram-z@chakra-project.org>
Sat, 3 Nov 2012 16:16:02 +0000 (17:16 +0100)
This leads to some issues, .desktop files being written to WINE_HOME,
pulse cache too, etc

This reverts commit c65b6c2d1f7a03ab75834a38809cba7e91f4ab94.

bin/wine

index bca118415fbc48b30b12ce0e574bd3ac0ef42704..848e73b1a6dd9137ece49ca55d75911c73bfdc1a 100755 (executable)
--- a/bin/wine
+++ b/bin/wine
@@ -4,4 +4,17 @@ WINE_HOME=/mnt/sdd5/wineprefixes/wine_home
 
 WINE=/usr/bin/wine
 
-WINEARCH=${WINEARCH:-win32} HOME="$WINE_HOME" $WINE "$@"
+if [[ ! -d "$WINE_HOME" ]]; then
+   echo "'$WINE_HOME' does not exist, please create it first"
+   exit 1
+fi
+
+[[ -d "$WINEPREFIX" ]] || wineboot -i
+
+declare -a DIRS=('Desktop' 'My Documents' 'My Music' 'My Pictures' 'My Videos')
+for DIR in "${DIRS[@]}"; do
+    [[ ! -d "$WINE_HOME/$DIR" ]] && mkdir "$WINE_HOME/$DIR"
+    ln -sfT "$WINE_HOME/$DIR" "$WINEPREFIX/drive_c/users/$USER/$DIR"
+done
+
+$WINE "$@"