[zaptel-commits] tzafrir: branch 1.4 r3852 - /branches/1.4/install_prereq

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Mon Feb 18 19:01:02 CST 2008


Author: tzafrir
Date: Mon Feb 18 19:01:01 2008
New Revision: 3852

URL: http://svn.digium.com/view/zaptel?view=rev&rev=3852
Log:
'install_prereq test' now gives an error status if there's something to
isntall.

Modified:
    branches/1.4/install_prereq

Modified: branches/1.4/install_prereq
URL: http://svn.digium.com/view/zaptel/branches/1.4/install_prereq?view=diff&rev=3852&r1=3851&r2=3852
==============================================================================
--- branches/1.4/install_prereq (original)
+++ branches/1.4/install_prereq Mon Feb 18 19:01:01 2008
@@ -14,17 +14,22 @@
   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 @@
 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 "#############################################"




More information about the zaptel-commits mailing list