-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcxwine.sh
35 lines (35 loc) · 809 Bytes
/
cxwine.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
cxpath="$HOME/Library/Application Support/CrossOver/Bottles"
cxapp="/Applications/CrossOver.app/Contents/SharedSupport/CrossOver/bin"
function _cxrun() {
if [ ! -n "$2" ] || [ ! -d "$cxpath/$2" ]
then
echo "Bottle does not exist."
return
fi
"$cxapp/cxbottle" --bottle "$2" "--$1"
}
function cxcreate() {
if [ -e "$cxpath/$1" ]
then
echo "Bottle already exists."
return
fi
if [ ! -n "$2" ]
then
set "$1" "win7"
fi
"$cxapp/cxbottle" --bottle "$1" --create --template "$2"
}
alias cxdelete="_cxrun delete"
alias cxswitch="_cxrun default"
function cxwine() {
if [ ! -h "$cxpath/default" ]
then
echo "Default bottle not set!"
return
fi
rm "$cxpath/default/.eval" >/dev/null 2>&1
echo "Starting..."
"$cxapp/wine" "$@"
}
alias cxfuck="killall -9 wine32on64-preloader wine64-preloader"