From f1ee87664482ec816d544d226c1f96072ccc8fb2 Mon Sep 17 00:00:00 2001 From: rain Date: Tue, 16 Aug 2016 19:11:58 +0100 Subject: [PATCH] separate function for determining linux distro --- scripts/install_deps.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/install_deps.sh b/scripts/install_deps.sh index bbf28d957..3884cb123 100755 --- a/scripts/install_deps.sh +++ b/scripts/install_deps.sh @@ -55,6 +55,11 @@ # Check for 'uname' and abort if it is not available. 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) + echo $DISTRO +} + case $(uname -s) in #------------------------------------------------------------------------------ @@ -124,7 +129,7 @@ case $(uname -s) in #------------------------------------------------------------------------------ Linux) - case $(lsb_release -is) in + case $(detect_linux_distro) in #------------------------------------------------------------------------------ # Arch Linux