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"