-
Notifications
You must be signed in to change notification settings - Fork 3
/
winehq-installer.sh
55 lines (54 loc) · 1.51 KB
/
winehq-installer.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
version="4.0"
flags=""
OS=$(lsb_release -is)
printversion(){
echo "WineHQ installer version $version"
echo "Wine "
}
ubuntu(){
./core/winhq-installer-ubuntu.sh
}
debian(){
./core/winhq-installer-debain.sh
}
fedora(){
./core/winhq-installer-fedora.sh
}
print_usage() {
echo "Options:"
echo "--ubuntu | -u Enters the Ubuntu installer of wine"
echo "-fedora Enters the Fedora installer of wine"
echo "-debian | -d Enters the Debian installer of wine"
echo "-version | -v Prints app information"
echo "-upgrade | -u Upgrades your Wine. Ubuntu updates may be applied for the smooth experience for wine."
echo "-verbose | Displays all the logs on screen."
echo "-silent Finishes All the processes with no output. Useful for using it in the background.."
echo "-log Adds debug logs to process any errors."
}
while true; do
case "$1" in
--verbose ) VERBOSE=true; shift ;;
-u |--ubuntu ) DEBUG=true; shift ;;
-fedora ) MEMORY="$2"; shift 2 ;;
--debugfile ) DEBUGFILE="$2"; shift 2 ;;
--minheap )
JAVA_MISC_OPT="$JAVA_MISC_OPT -XX:MinHeapFreeRatio=$2"; shift 2 ;;
--maxheap )
JAVA_MISC_OPT="$JAVA_MISC_OPT -XX:MaxHeapFreeRatio=$2"; shift 2 ;;
-- ) shift; break ;;
* ) break ;;
esac
done
while getopts 'udfv:ve' flag; do
case "${flag}" in
u) ubuntu ;;
fedora) fedora ;;
debian) debian ;;
ve) printversion ;;
verbose) flags="$flags -v" ;;
*) print_usage
exit 1 ;;
esac
done
echo