-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathset-distro
49 lines (46 loc) · 1.65 KB
/
set-distro
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
#!/bin/bash
# Determine the distro.
# That part may considerably change in the future.
if grep -iqE 'Ubuntu|Linux Mint|Backtrack 5' /etc/issue; then
DISTRO=ubuntu
elif grep -iq "Arch Linux" /etc/issue; then
DISTRO=archlinux
elif grep -iq "CentOS" /etc/issue; then
DISTRO=centos
elif grep -iq Fedora /etc/issue; then
DISTRO=fedora
echo "You are running Fedora, the work is in progress for you distro but not"
echo "sufficient. If you would like to help to port the installer to fedora,"
echo "please visit https://github.com/Bumblebee-Project/Bumblebee/issues"
exit 3
elif grep -iq OpenSUSE /etc/issue; then
DISTRO=opensuse
echo "You are running openSUSE, the work is in progress for you distro but not"
echo "sufficient. If you would like to help to port the installer to openSUSE,"
echo "please visit https://github.com/Bumblebee-Project/Bumblebee/issues"
exit 3
elif grep -iq Debian /etc/issue; then
DISTRO=debian
echo "You are running Debian Linux, please see the debumblebee project for support:"
echo
echo "https://github.com/z0rc/debumblebee"
echo
$UNATTENDED || read
exit 3
elif grep -iq "Gentoo" /etc/issue; then
DISTRO=gentoo
echo "You are running Gentoo Linux, please see the ebuild here for support:"
echo
echo "https://github.com/iegor/rainyday/tree/master/x11-misc/bumblebee"
echo
$UNATTENDED || read
exit 3
else
echo
echo "Your Distribution could not be determined or is not supported."
echo "Please report a bug at:"
echo
echo "https://github.com/Bumblebee-Project/Bumblebee/issues"
exit 3
fi
echo "${DISTRO}-based distribution detected"