Skip to content

Commit 88ad8ae

Browse files
authored
Update install.sh
1 parent 68df7a9 commit 88ad8ae

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

install.sh

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -116,23 +116,24 @@ get_architecture() {
116116

117117
case "$_ostype" in
118118
Linux | linux)
119-
local _ostype="ubuntu22.04"
120-
if check_cmd lsb_release; then
121-
local _ubuntu_ostype="$(lsb_release -ds)"
122-
case "$_ubuntu_ostype" in
123-
Ubuntu\ 22*)
124-
check_apt_install libc++abi1-15
125-
;;
126-
Ubuntu\ 20*)
127-
check_apt_install libc++abi1-10
128-
local _ostype="ubuntu20.04"
129-
;;
130-
Debian\ GNU\/Linux\ 10*)
131-
check_apt_install libc++abi1-7
132-
local _ostype="debian10"
133-
;;
134-
esac
135-
fi
119+
local _os_id="$(awk -F= '$1=="ID" { print $2 ;}' /etc/os-release | tr -d '"')"
120+
local _os_version_id="$(awk -F= '$1=="VERSION_ID" { print $2 ;}' /etc/os-release | tr -d '"')"
121+
local _ostype="$_os_id$_os_version_id"
122+
case "$_ostype" in
123+
ubuntu22*)
124+
check_apt_install libc++abi1-15
125+
;;
126+
ubuntu20*)
127+
check_apt_install libc++abi1-10
128+
;;
129+
debian10*)
130+
check_apt_install libc++abi1-7
131+
;;
132+
fedora39*)
133+
;;
134+
centos*)
135+
;;
136+
esac
136137
;;
137138
Darwin)
138139
local _ostype=darwin

0 commit comments

Comments
 (0)