summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Andreas Krennmair <ak@synflood.at> 2009-06-19 22:39:32 +0200
committerGravatar Andreas Krennmair <ak@synflood.at> 2009-06-19 22:39:32 +0200
commit9245ec19a295b2e4459fa587b5f7b7866cc1921d (patch)
tree4793d508e9ed7a22a9f35072722cb87cf4e30cae
parentefa19ce2c4b7ec46a67f4163934a7ee620f7f814 (diff)
downloadnewsboat-9245ec19a295b2e4459fa587b5f7b7866cc1921d.tar.gz
newsboat-9245ec19a295b2e4459fa587b5f7b7866cc1921d.tar.zst
newsboat-9245ec19a295b2e4459fa587b5f7b7866cc1921d.zip
updated config.sh script to display all unfulfilled dependencies before failing.
Diffstat (limited to '')
-rwxr-xr-xconfig.sh17
1 files changed, 15 insertions, 2 deletions
diff --git a/config.sh b/config.sh
index 77a29622..21d8d046 100755
--- a/config.sh
+++ b/config.sh
@@ -1,5 +1,7 @@
#!/bin/sh
+FAILSTATUS=""
+
check_pkg() {
pkgname=$1
add_define=$2
@@ -51,14 +53,24 @@ fail() {
echo "Please make sure it is installed."
echo ""
echo "You can download ${pkgname} from here: ${dlurl}"
- exit 1
+ FAILSTATUS="1"
}
fail_custom() {
err=$1
echo ""
echo "ERROR: ${err}"
- exit 1
+ FAILSTATUS="1"
+}
+
+all_aboard_the_fail_boat() {
+ if [ "x$FAILSTATUS" != "x" ] ; then
+ rm -f config.mk
+ echo ""
+ echo "One or more dependencies couldn't be found. Please install"
+ echo "these packages and retry compilation."
+ exit 1
+ fi
}
echo "" > config.mk
@@ -67,3 +79,4 @@ check_pkg "sqlite3" || fail "sqlite3"
check_pkg "libcurl" || check_custom "libcurl" "curl-config" || fail "libcurl"
check_pkg "libxml-2.0" || check_custom "libxml2" "xml2-config" || fail "libxml2"
check_pkg "stfl" "" "--static" || fail "stfl"
+all_aboard_the_fail_boat