From d806d4d32357ee044842d35122781a15447975a8 Mon Sep 17 00:00:00 2001 From: ProfessorKaos64 Date: Fri, 31 Oct 2014 16:45:26 -0400 Subject: [PATCH] updated rrs_discover_distro --- scriptmodules/setup.shinc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/scriptmodules/setup.shinc b/scriptmodules/setup.shinc index e76cdec..fda6976 100644 --- a/scriptmodules/setup.shinc +++ b/scriptmodules/setup.shinc @@ -354,6 +354,14 @@ function rrs_post_install() function rrs_discover_distro() { + + # Users that may run this on a non-Linux OS: + UNAME=`uname` + if [ "$UNAME" != "Linux" ]; then + echo "Error: Unsupported Operating System" + exit 1 + fi + # OS Distro OS_ID_STRING=$(lsb_release -a 2>/dev/null|grep "Distributor ID") OS_TYPE=$(echo $OS_ID_STRING|cut -f 3 -d ' ') @@ -361,6 +369,17 @@ function rrs_discover_distro() # Release OS_RELEASE_STRING=$(lsb_release -a 2>/dev/null|grep "Release") OS_RELEASE=$(echo $OS_RELEASE_STRING | sed s/' '//g | cut -f 2 -d ':') + + # Arch + case $(uname -m) in + *64) + echo "64-bit" + ;; + *) + echo "32-bit" + ;; + esac + } function rrs_source_syscalls()