From 36fffafc5c5aa033f4a1a275abe21edda96b72d3 Mon Sep 17 00:00:00 2001 From: tzafrir Date: Tue, 19 Feb 2008 01:01:01 +0000 Subject: 'install_prereq test' now gives an error status if there's something to isntall. git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@3852 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- install_prereq | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'install_prereq') diff --git a/install_prereq b/install_prereq index dac0189..aadc77f 100755 --- a/install_prereq +++ b/install_prereq @@ -14,17 +14,22 @@ usage() { echo "Usage: $0 install Really install." } -PACKAGES_DEBIAN="build-essential libnewt-dev libusb-dev" +PACKAGES_DEBIAN="build-essential libnewt-dev libusb-dev modemp3d" PACKAGES_RH="gcc newt-devel libusb-devel" KVERS=`uname -r` case "$1" in -test) testcmd=echo ;; +test) testcmd=test_cmd ;; install) testcmd='' ;; '') usage; exit 0 ;; *) usage; exit 1 ;; esac +NOTHING_TO_INSTALL=true +test_cmd() { + NOTHING_TO_INSTALL=false + echo "$@" +} # Fixme: should be done by apt and not by dpkg? check_installed_debs() { @@ -111,8 +116,14 @@ elif [ -r /etc/redhat-release ]; then fi echo "#############################################" -echo "## $1 completed successfully" if in_test_mode; then - echo "## (in test mode)" + if $NOTHING_TO_INSTALL; then + echo "## $1 completed successfully ((In test mode) " + else + echo "## $1: some extra packages are needed to build zaptel" + exit 1 + fi +else + echo "## $1 completed successfully" fi echo "#############################################" -- cgit v1.2.3