-
Notifications
You must be signed in to change notification settings - Fork 50
/
install.sh
executable file
·160 lines (117 loc) · 3.68 KB
/
install.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
#!/bin/bash -l
# ----------------------------------------------------------------------------
# "Red Bull License"
# <[email protected]> wrote this file and is providing free support
# in any spare time. If you need extended support, you can fuel him up by
# donating a Red Bull here to get him through the nights..:
#
# http://tinyurl.com/bumblebee-project
#
# ----------------------------------------------------------------------------
#
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# <[email protected]> wrote this file. As long as you retain this notice you
# can do whatever you want with this stuff. If we meet some day, and you think
# this stuff is worth it, you can buy me a beer in return Martin Juhl
# ----------------------------------------------------------------------------
#
# This file is part of bumblebee.
#
# bumblebee is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# bumblebee is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with bumblebee. If not, see <http://www.gnu.org/licenses/>.
#
echo "** This Bumblebee version is outdated **"
echo "Development for Bumblebee has continued by the Bumblebee Project:"
echo "https://github.com/Bumblebee-Project/Bumblebee"
echo "https://twitter.com/Team_Bumblebee"
echo
read -p "Would you like to continue using this outdated version? (y/N)" yn
[[ $yn == [Yy]* ]] || exit 0
BUMBLEBEEVERSION=1.7.10
source stages/determinedistro
echo
echo $DISTRO"-based distribution found."
echo
source stages/checkrights.$DISTRO
#Determine Arch x86_64 or i686
ARCH=`uname -m`
#Get tools location
LSPCI=`which lspci`
MODPROBE=`which modprobe`
#Variables
BUMBLEBEEPWD=$PWD
CONNECTEDMONITOR="UNDEFINED"
IMAGETRANSPORT="UNDEFINED"
POWERON="UNDEFINED"
POWEROFF="UNDEFINED"
INTELBUSID="UNDEFINED"
NVIDIABUSID="UNDEFINED"
source stages/welcome
echo
echo "Installing needed packages."
echo
source stages/packageinstall.$DISTRO
echo
echo "Installing acpi_module"
echo
source stages/acpicall.$DISTRO
echo
echo "Backing up Configuration"
echo
source stages/backupconf.$DISTRO
echo
echo "Installing Bumblebee Configuration and files"
echo
source stages/installbumblebee.$DISTRO.pre
source stages/installbumblebee.$DISTRO
source stages/installbumblebee.post
echo
echo "Auto-detecting hardware"
echo
source stages/autoconfiguration
source stages/busiddetection
source stages/autodetectmonitor.$DISTRO
source stages/manualselectmonitor
source stages/powerconfiguration.$DISTRO
echo
echo "Setting output device to: $CONNECTEDMONITOR"
echo
sed -i 's/REPLACEWITHCONNECTEDMONITOR/'$CONNECTEDMONITOR'/g' /etc/X11/xorg.conf.nvidia
echo
echo "Setting up Bumblebee Service"
echo
source stages/setupbumblebeeservice.$DISTRO
echo
echo "Setting up Environment variables"
echo
source stages/enviromentvariables
source stages/setvariables.$DISTRO
if [ "$DISTRO" != UBUNTU ] && [ "$DISTRO" != OPENSUSE ] ; then
source stages/setupvglclient
fi
echo
echo "Setting up bumblebee user rights and/or stating services."
echo
source stages/userrights.$DISTRO
echo
echo
echo
echo "Ok... Installation complete..."
echo
source stages/goodbye
echo "Bumblebee Version: "$BUMBLEBEEVERSION > /etc/bumblebee
echo
echo "Press any key to finish installation..."
read
exit 0