From: Samir Benmendil Date: Tue, 30 Oct 2012 00:48:56 +0000 (+0100) Subject: create wine wrapper X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/f0d7cb04336c40693cda28f34247b8ca54d3bddd?ds=sidebyside create wine wrapper --- diff --git a/bin/wine b/bin/wine new file mode 100755 index 0000000..848e73b --- /dev/null +++ b/bin/wine @@ -0,0 +1,20 @@ +#!/bin/bash + +WINE_HOME=/mnt/sdd5/wineprefixes/wine_home + +WINE=/usr/bin/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 "$@"