summaryrefslogtreecommitdiff
path: root/install_prereq
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-02-19 01:01:01 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-02-19 01:01:01 +0000
commit36fffafc5c5aa033f4a1a275abe21edda96b72d3 (patch)
tree4031f69ceca7fda04e7aabb36a893b1f5a298f4c /install_prereq
parent17f90ff41250e4d54de6b855b3b22d349bd88936 (diff)
'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
Diffstat (limited to 'install_prereq')
-rwxr-xr-xinstall_prereq19
1 files changed, 15 insertions, 4 deletions
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 "#############################################"