diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ca63017 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +bootstrap.log diff --git a/bootstrap-debian-dev.sh b/bootstrap-debian-dev.sh index 1b81cca..1a97558 100644 --- a/bootstrap-debian-dev.sh +++ b/bootstrap-debian-dev.sh @@ -34,8 +34,12 @@ usage() { checkRequirements() { # Test if system is supported - uname -a | grep -E "${REQUIRED_SYSTEMS}" 1>/dev/null 2>>"${ERROR_LOG}" - if [ ! "${?}" -eq 0 ]; then + DISTRO_CHECK="$(command -v lsb_release)" + if [ -z "$DISTRO_CHECK" ]; then + DISTRO_CHECK="$(command -v uname)" + fi + "$DISTRO_CHECK" -a | grep -E "${REQUIRED_SYSTEMS}" 1>/dev/null 2>>"${ERROR_LOG}" + if [ ! "${?}" -eq 0 ] && [ ! -e /etc/debian_version ]; then echo "" echo "This is system is not a supported Ubuntu or Debian system." echo "" diff --git a/bootstrap-debian.sh b/bootstrap-debian.sh index 3577a73..6355279 100644 --- a/bootstrap-debian.sh +++ b/bootstrap-debian.sh @@ -34,8 +34,12 @@ usage() { checkRequirements() { # Test if system is supported - uname -a | grep -E "${REQUIRED_SYSTEMS}" 1>/dev/null 2>>"${ERROR_LOG}" - if [ ! "${?}" -eq 0 ]; then + DISTRO_CHECK="$(command -v lsb_release)" + if [ -z "$DISTRO_CHECK" ]; then + DISTRO_CHECK="$(command -v uname)" + fi + "$DISTRO_CHECK" -a | grep -E "${REQUIRED_SYSTEMS}" 1>/dev/null 2>>"${ERROR_LOG}" + if [ ! "${?}" -eq 0 ] && [ ! -e /etc/debian_version ]; then echo "" echo "This is system is not a supported Ubuntu or Debian system." echo ""