From 973ae8b80ae494ad98eba06bc812ade5beb0ddff Mon Sep 17 00:00:00 2001 From: Jan-Tarek Butt <tarek@ring0.de> Date: Mon, 30 May 2016 20:56:04 +0200 Subject: [PATCH] add OS check before dependency check --- build/build.sh | 109 +++++++++++++++++++++++++------------------------ 1 file changed, 55 insertions(+), 54 deletions(-) diff --git a/build/build.sh b/build/build.sh index ed1476c..2e8c807 100644 --- a/build/build.sh +++ b/build/build.sh @@ -7,61 +7,62 @@ GLUON_BRANCH="$1" GLUON_VERSION="$2" #check installed debendenciece -echo "Checking for git..." -if ! command -v git 2&> /dev/null; then - echo "git is not installed" - exit 1 +if [ -f /etc/debian_version ]; then + echo "Checking for git..." + if ! command -v git 2&> /dev/null; then + echo "git is not installed" + exit 1 + fi + echo "Detected git..." + echo "Checking for subversion..." + if ! command -v svn > /dev/null; then + echo "subversion is not installed" + exit 1 + fi + echo "Detected subversion..." + echo "Checking for python..." + if ! which python > /dev/null; then + echo "python is not installed" + exit 1 + fi + echo "Detected python..." + echo "Checking for build-essential..." + if ! dpkg -s build-essential > /dev/null; then + echo "build-essential is not installed" + exit 1 + fi + echo "Detected build-essential..." + echo "Checking for gawk..." + if ! dpkg -s gawk > /dev/null; then + echo "gawk is not installed" + exit 1 + fi + echo "Detected gawk..." + echo "Checking for unzip..." + if ! dpkg -s unzip > /dev/null; then + echo "unzip is not installed" + exit 1 + fi + echo "Detected unzip..." + echo "Checking for libncurses5-dev..." + if ! dpkg -s libncurses5-dev > /dev/null; then + echo "libncurses5-dev is not installed" + exit 1 + fi + echo "Detected libncurses5-dev..." + echo "Checking for zlib1g-dev..." + if ! dpkg -s zlib1g-dev > /dev/null; then + echo "zlib1g-dev is not installed" + exit 1 + fi + echo "Detected zlib1g-dev..." + echo "Checking for libssl-dev..." + if ! dpkg -s libssl-dev > /dev/null; then + echo "libssl-dev is not installed" + exit 1 + fi + echo "Detected libssl-dev..." fi -echo "Detected git..." -echo "Checking for subversion..." -if ! command -v svn > /dev/null; then - echo "subversion is not installed" - exit 1 -fi -echo "Detected subversion..." -echo "Checking for python..." -if ! which python > /dev/null; then - echo "python is not installed" - exit 1 -fi -echo "Detected python..." -echo "Checking for build-essential..." -if ! dpkg -s build-essential > /dev/null; then - echo "build-essential is not installed" - exit 1 -fi -echo "Detected build-essential..." -echo "Checking for gawk..." -if ! dpkg -s gawk > /dev/null; then - echo "gawk is not installed" - exit 1 -fi -echo "Detected gawk..." -echo "Checking for unzip..." -if ! dpkg -s unzip > /dev/null; then - echo "unzip is not installed" - exit 1 -fi -echo "Detected unzip..." -echo "Checking for libncurses5-dev..." -if ! dpkg -s libncurses5-dev > /dev/null; then - echo "libncurses5-dev is not installed" - exit 1 -fi -echo "Detected libncurses5-dev..." -echo "Checking for zlib1g-dev..." -if ! dpkg -s zlib1g-dev > /dev/null; then - echo "zlib1g-dev is not installed" - exit 1 -fi -echo "Detected zlib1g-dev..." -echo "Checking for libssl-dev..." -if ! dpkg -s libssl-dev > /dev/null; then - echo "libssl-dev is not installed" - exit 1 -fi -echo "Detected libssl-dev..." - # Make Folder site mkdir site -- GitLab