Skip to content

Commit

Permalink
Merge pull request #13 from RangerRick/master
Browse files Browse the repository at this point in the history
fix Ubuntu detection on 18.04
  • Loading branch information
indigo423 authored Jul 12, 2018
2 parents 01ab3fa + 0aa42b3 commit 33e5138
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bootstrap.log
8 changes: 6 additions & 2 deletions bootstrap-debian-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""
Expand Down
8 changes: 6 additions & 2 deletions bootstrap-debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""
Expand Down

0 comments on commit 33e5138

Please sign in to comment.