]> git.rmz.io Git - dotfiles.git/commitdiff
only create links if they don't already exist
authorSamir Benmendil <ram-z@chakra-project.org>
Sat, 1 Dec 2012 17:02:32 +0000 (18:02 +0100)
committerSamir Benmendil <ram-z@chakra-project.org>
Sat, 1 Dec 2012 17:02:32 +0000 (18:02 +0100)
bin/wine

index 848e73b1a6dd9137ece49ca55d75911c73bfdc1a..42215e7a080d90b1e4527749db35316f001adca2 100755 (executable)
--- a/bin/wine
+++ b/bin/wine
@@ -3,18 +3,21 @@
 WINE_HOME=/mnt/sdd5/wineprefixes/wine_home
 
 WINE=/usr/bin/wine
+export WINEARCH=${WINEARCH:-win32}
 
 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
+if [[ ! -d "$WINEPREFIX" ]]; then
+    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
+fi
 
 $WINE "$@"