From b839ba8d30ecc5076d115867ae0bff98af71f897 Mon Sep 17 00:00:00 2001 From: Steven Foerster Date: Sat, 7 Mar 2020 21:48:05 -0500 Subject: [PATCH] platform script --- scripts/install.sh | 14 ++------------ scripts/subinstallers/platform.sh | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 12 deletions(-) create mode 100755 scripts/subinstallers/platform.sh diff --git a/scripts/install.sh b/scripts/install.sh index 1efb7f3..9addae5 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -57,18 +57,8 @@ echo -e "| | | | \__ \ |_| |_) | (_) | | | | | |" echo -e "|_| |_|_|___/\__|_.__/ \___/|_| |_| |_|" echo -e "" -# Get OS info -# Determine OS platform -UNAME=$(uname | tr "[:upper:]" "[:lower:]") -DISTRO="" -# If Linux, try to determine specific distribution -if [ "$UNAME" == "linux" ]; then - # use /etc/os-release to get distro - DISTRO=$(cat /etc/os-release | awk -F= '/^ID=/{print $2}') -fi - -echo "UNAME: $UNAME" -echo "DISTRO: $DISTRO" +# get os and distro +source ./scripts/subinstallers/platform.sh # INPUT default admin password if [ -z "${MISTBORN_DEFAULT_PASSWORD}" ]; then diff --git a/scripts/subinstallers/platform.sh b/scripts/subinstallers/platform.sh new file mode 100755 index 0000000..08e4c00 --- /dev/null +++ b/scripts/subinstallers/platform.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Get OS info +# Determine OS platform +UNAME=$(uname | tr "[:upper:]" "[:lower:]") +DISTRO="" +# If Linux, try to determine specific distribution +if [ "$UNAME" == "linux" ]; then + # use /etc/os-release to get distro + DISTRO=$(cat /etc/os-release | awk -F= '/^ID=/{print $2}') +fi + +echo "UNAME: $UNAME" +echo "DISTRO: $DISTRO"