aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/install_deps.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/install_deps.sh b/scripts/install_deps.sh
index 3884cb12..2ae17737 100755
--- a/scripts/install_deps.sh
+++ b/scripts/install_deps.sh
@@ -56,7 +56,14 @@
uname -v > /dev/null 2>&1 || { echo >&2 "ERROR - solidity requires 'uname' to identify the platform."; exit 1; }
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
}