From 0635309f23d4f61df9230b4018db7c2293c86d05 Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Sat, 21 Jan 2017 12:34:47 -0800 Subject: [PATCH] Move distribution check to function. Signed-off-by: Dan Schaper --- automated install/basic-install.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index ad7924a4..9a4ced19 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -53,7 +53,7 @@ reconfigure=false runUnattended=false # Compatibility - +distro_check() { if command -v apt-get &> /dev/null; then #Debian Family ############################################# @@ -103,8 +103,8 @@ else echo "OS distribution not supported" exit fi +} -####### FUNCTIONS ########## is_repo() { # Use git to check if directory is currently under VCS, return the value 128 # if directory is not a repo. Return 1 if directory does not exist. @@ -1055,6 +1055,9 @@ main() { fi fi + # Check for supported distribution + distro_check + # Check arguments for the undocumented flags for var in "$@"; do case "$var" in