[debian-edu-commits] debian-edu/ 02/04: scripts/get_manual: refactor and error out more clearly.

Holger Levsen holger at layer-acht.org
Mon Oct 17 14:02:53 UTC 2016


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository debian-edu-doc.

commit 78ca342af574f3033aebd034f40e68fce1b5e0f0
Author: Holger Levsen <holger at layer-acht.org>
Date:   Mon Oct 17 15:49:51 2016 +0200

    scripts/get_manual: refactor and error out more clearly.
---
 debian/changelog                 |  6 ++++--
 documentation/scripts/get_manual | 18 ++++++++++++------
 2 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 3a63b7d..555916f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,9 @@
 debian-edu-doc (1.909~20161018) UNRELEASED; urgency=medium
 
-  * scripts/get_manual: add check whether libwww-perl is installed and error
-    out early if it is not.
+  * scripts/get_manual:
+    - add check whether libwww-perl is installed and error out early if it is
+      not.
+    - error out more clearly.
 
  -- Holger Levsen <holger at debian.org>  Mon, 17 Oct 2016 15:39:08 +0200
 
diff --git a/documentation/scripts/get_manual b/documentation/scripts/get_manual
index bd73f7e..7958673 100755
--- a/documentation/scripts/get_manual
+++ b/documentation/scripts/get_manual
@@ -22,19 +22,25 @@
 
 #set -x
 
-if [ ! $(which xmllint) ] ; then
-	echo "Please install libxml2-utils."
+exit_loud_and_clearly() {
+	echo "-----------------------------------------------------"
+	echo
+	echo "$1"
+	echo
+	echo "-----------------------------------------------------"
 	exit 1
+}
+
+if [ ! $(which xmllint) ] ; then
+	exit_loud_and_clearly "Please install libxml2-utils."
 fi
 
 if [ ! $(which GET) ] ; then
-	echo "Please install libwww-perl."
-	exit 1
+	exit_loud_and_clearly "Please install libwww-perl."
 fi
 
 if [ "$name" = "" ] ; then 
-	echo "error: missing \$name variable, not exported from Makefile?"
-	exit 1
+	exit_loud_and_clearly "error: missing \$name variable, not exported from Makefile?"
 fi
 TMPFILE=$(mktemp)
 xmlfile=$name.xml

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/debian-edu-doc.git



More information about the debian-edu-commits mailing list