mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
fall back to os-release if lsb_release not present
This commit is contained in:
parent
f1ee876644
commit
14c15e8154
@ -56,7 +56,14 @@
|
|||||||
uname -v > /dev/null 2>&1 || { echo >&2 "ERROR - solidity requires 'uname' to identify the platform."; exit 1; }
|
uname -v > /dev/null 2>&1 || { echo >&2 "ERROR - solidity requires 'uname' to identify the platform."; exit 1; }
|
||||||
|
|
||||||
detect_linux_distro() {
|
detect_linux_distro() {
|
||||||
DISTRO=$(lsb_release -is)
|
if [ $(command -v lsb_release) ]; then
|
||||||
|
DISTRO=$(lsb_release -is)
|
||||||
|
elif [ -f /etc/os-release ]; then
|
||||||
|
# extract 'foo' from NAME=foo, only on the line with NAME=foo
|
||||||
|
DISTRO=$(sed -n -e 's/^NAME="\(.*\)\"/\1/p' /etc/os-release)
|
||||||
|
else
|
||||||
|
DISTRO=''
|
||||||
|
fi
|
||||||
echo $DISTRO
|
echo $DISTRO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user