3
3
. ../common-script.sh
4
4
5
5
checkGpu () {
6
- if lspci | grep -i nvidia > /dev/null; then
6
+ if lspci | grep -i nvidia > /dev/null; then
7
7
printf " %b\n" " ${RED} Waydroid is not compatible with NVIDIA GPUs.${RC} "
8
8
exit 1
9
9
fi
10
10
}
11
11
12
12
installWaydroid () {
13
13
if ! command_exists waydroid; then
14
- printf " %b\n" " ${YELLOW} Installing Waydroid...${RC} "
14
+ printf " %b\n" " ${YELLOW} Installing Waydroid...${RC} "
15
15
case " $PACKAGER " in
16
16
pacman)
17
17
" $AUR_HELPER " -S --needed --noconfirm waydroid
18
+
18
19
if ! command_exists dkms; then
19
- installed_kernels=$( " $PACKAGER " -Q | grep -E ' ^linux(| |-rt|-rt-lts|-hardened|-zen|-lts)[^-headers]' | cut -d ' ' -f 1)
20
- for kernel in $installed_kernels ; do
21
- header=" ${kernel} -headers"
22
- printf " %b\n" " ${CYAN} Installing headers for $kernel ...${RC} "
23
- " $ESCALATION_TOOL " " $PACKAGER " -S --needed --noconfirm " $header "
24
- done
25
20
" $ESCALATION_TOOL " " $PACKAGER " -S --needed --noconfirm dkms
26
21
fi
22
+
23
+ installed_kernels=$( " $PACKAGER " -Q | grep -E ' ^linux(| |-rt|-rt-lts|-hardened|-zen|-lts)[^-headers]' | cut -d ' ' -f 1)
24
+ for kernel in $installed_kernels ; do
25
+ header=" ${kernel} -headers"
26
+ printf " %b\n" " ${CYAN} Installing headers for $kernel ...${RC} "
27
+ " $ESCALATION_TOOL " " $PACKAGER " -S --needed --noconfirm " $header "
28
+ done
29
+
27
30
" $AUR_HELPER " -S --needed --noconfirm binder_linux-dkms
28
31
" $ESCALATION_TOOL " modprobe binder-linux device=binder,hwbinder,vndbinder
29
32
;;
30
- apt-get| nala)
33
+ apt-get | nala)
31
34
curl https://repo.waydro.id | " $ESCALATION_TOOL " sh
32
35
" $ESCALATION_TOOL " " $PACKAGER " install -y waydroid
33
36
if command_exists dkms; then
34
37
" $ESCALATION_TOOL " " $PACKAGER " install -y git
35
- mkdir -p " $HOME /.local/share/" # only create it if it doesnt exist
38
+ mkdir -p " $HOME /.local/share/"
36
39
git clone https://github.com/choff/anbox-modules.git " $HOME /.local/share/anbox-modules"
37
40
cd " $HOME /.local/share/anbox-modules"
38
41
" $ESCALATION_TOOL " cp anbox.conf /etc/modules-load.d/
@@ -47,7 +50,7 @@ installWaydroid() {
47
50
" $ESCALATION_TOOL " " $PACKAGER " install -y waydroid
48
51
if command_exists dkms; then
49
52
" $ESCALATION_TOOL " " $PACKAGER " install -y git
50
- mkdir -p " $HOME /.local/share/" # only create it if it doesnt exist
53
+ mkdir -p " $HOME /.local/share/"
51
54
git clone https://github.com/choff/anbox-modules.git " $HOME /.local/share/anbox-modules"
52
55
cd " $HOME /.local/share/anbox-modules"
53
56
" $ESCALATION_TOOL " cp anbox.conf /etc/modules-load.d/
0 commit comments