abi/bootstrap: Warn on non-debian systems what might need to be done

The scripts work on non-debian systems with a few minor changes.  Warn
the user when running bootstrap that there might be some packages they
need to install on their own before continuing.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I93345bf19a6b4829a81d5b30c45538d6338bd914
diff --git a/abi/bootstrap b/abi/bootstrap
index c2521d2..d158522 100755
--- a/abi/bootstrap
+++ b/abi/bootstrap
@@ -30,13 +30,25 @@
   read
 fi
 
-set -x
-
 PACKAGES="autoconf libtool libxml2-dev pkg-config python3"
 # Install the dependencies.
-if ! dpkg -s ${PACKAGES} > /dev/null 2>&1 ; then
+if ! ( hash dpkg 2>/dev/null ); then
+    echo "WARN: not running on a Debian compatible system!"
+    echo "      Please be sure you have the required packages installed on"
+    echo "      your system before continuing."
+    echo ""
+    echo "      The list of required packages is, at the minimum:"
+    echo "        ${PACKAGES}"
+    echo "      but some distributions may require more."
+    echo "      You are on your own here, be careful."
+    echo ""
+    echo "Press enter to continue or Ctrl-C to abort."
+    read
+elif ! dpkg -s ${PACKAGES} > /dev/null 2>&1 ; then
+    set -x
     sudo apt-get install --yes ${PACKAGES}
 fi
+set -x
 
 # Acquire elfutils sources
 if [ ! -d "${ELFUTILS_SRC}" ]; then