From f0d7cb04336c40693cda28f34247b8ca54d3bddd Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Tue, 30 Oct 2012 01:48:56 +0100 Subject: [PATCH] create wine wrapper --- bin/wine | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 bin/wine 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 "$@" -- 2.48.1