File tree 2 files changed +18
-1
lines changed
2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -9,9 +9,18 @@ COLOR_YELLOW="\e[33m"
9
9
COLOR_CYAN=" \e[36m"
10
10
COLOR_RED=" \e[31m"
11
11
12
+ if [ -f /etc/os-release ]; then
13
+ DISTRO=$( grep ^NAME= /etc/os-release | cut -d= -f2 | tr -d ' "' )
14
+ elif command -v lsb_release & > /dev/null; then
15
+ DISTRO=$( lsb_release -d | cut -f2)
16
+ else
17
+ DISTRO=" Unknown Linux Distribution"
18
+ fi
19
+
12
20
echo -e " ${COLOR_CYAN} "
13
21
figlet -f slant " Carch"
14
22
echo " Version $VERSION "
23
+ echo " Distribution: $DISTRO "
15
24
echo -e " ${COLOR_RESET} "
16
25
17
26
echo -e " ${COLOR_YELLOW} Select installation type:${COLOR_RESET} "
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ COLOR_GREEN="\e[32m"
7
7
COLOR_YELLOW=" \e[33m"
8
8
COLOR_CYAN=" \e[36m"
9
9
COLOR_RED=" \e[31m"
10
- COLOR_BLUE=" \e[34m"
11
10
12
11
VERSION=" 4.1.2"
13
12
TARGET_DIR=" /usr/bin"
@@ -45,9 +44,18 @@ install_rust
45
44
46
45
clear
47
46
47
+ if [ -f /etc/os-release ]; then
48
+ DISTRO=$( grep ^NAME= /etc/os-release | cut -d= -f2 | tr -d ' "' )
49
+ elif command -v lsb_release & > /dev/null; then
50
+ DISTRO=$( lsb_release -d | cut -f2)
51
+ else
52
+ DISTRO=" Unknown Linux Distribution"
53
+ fi
54
+
48
55
echo -e " ${COLOR_CYAN} "
49
56
figlet -f slant " Carch"
50
57
echo " Version $VERSION "
58
+ echo " Distribution: $DISTRO "
51
59
echo -e " ${COLOR_RESET} "
52
60
53
61
CHOICE=$( gum choose " Rolling Release" " Stable Release" " Cancel" )
You can’t perform that action at this time.
0 commit comments