-
Notifications
You must be signed in to change notification settings - Fork 0
/
lazy_updater.sh
executable file
·88 lines (65 loc) · 1.73 KB
/
lazy_updater.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/bin/bash
####################################################################
#########AUTOMATED LAZY BUMBLEBEE INSTALLER FOR SLACKWARE###########
####################################################################
location=$(pwd)
set -e
function kernel {
cd $location/bbswitch
./bbswitch.SlackBuild
upgradepkg --install-new /tmp/bbswitch-*.t?z
cd $location/nvidia-kernel
COMPAT32=yes ./nvidia-kernel.SlackBuild
upgradepkg --install-new /tmp/nvidia-kernel-*.t?z
}
function all {
cd $location/libbsd
./libbsd.SlackBuild
upgradepkg --install-new /tmp/libbsd-*.t?z
cd $location/bumblebee
./bumblebee.SlackBuild
upgradepkg --install-new /tmp/bumblebee-*.t?z
cd $location/bbswitch
./bbswitch.SlackBuild
upgradepkg --install-new /tmp/bbswitch-*.t?z
cd $location/primus
COMPAT32=yes ./primus.SlackBuild
upgradepkg --install-new /tmp/primus*.t?z
cd $location/nvidia-kernel
COMPAT32=yes ./nvidia-kernel.SlackBuild
upgradepkg --install-new /tmp/nvidia-kernel-*.t?z
cd $location/nvidia-bumblebee
COMPAT32=yes ./nvidia-bumblebee.SlackBuild # Only for 32-bit compatible binaries and libraries on an x86_64 based system.
upgradepkg --install-new /tmp/nvidia-bumblebee-*.t?z
}
function help {
echo "Usage:"
echo ""
echo "options"
echo "--all : reinstalls everything"
echo "--kernel : just installs the packages required when you install a new kernel"
echo "--help : prints this message"
}
if [ $UID != '0' ];
then
echo "Run as root"
exit
else
rm -rf /tmp/*bbsb*
if [ $1 = '--all' ];
then
all
else if [ $1 = '--kernel' ];
then
kernel
else if [ $1 = '--help' ];
then
help
else
help
fi
fi
fi
fi
chmod +x /etc/rc.d/rc.bumblebeed
#/etc/rc.d/rc.bumblebeed start