[PATCH modular 05/10] Add preconditions.

Trevor Woerner twoerner at gmail.com
Thu Sep 30 14:27:41 PDT 2010


From: Trevor Woerner <twoerner at gmail.com>

Provide preconditions for some of the functions in build.sh script.

Signed-off-by: Trevor Woerner <twoerner at gmail.com>
---
 build.sh |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/build.sh b/build.sh
index 07cdea0..5be2337 100755
--- a/build.sh
+++ b/build.sh
@@ -174,6 +174,12 @@ checkfortars() {
 #   0 - good
 #   1 - bad
 clone() {
+    # preconds
+    if [ X"$1" = X ]; then
+	echo "clone() required argument \$1 missing"
+	return 1
+    fi
+
     case $1 in
         "pixman")
         BASEDIR=""
@@ -218,6 +224,12 @@ clone() {
 process() {
     local rtn
 
+    # preconds
+    if [ X"$1" = X ]; then
+	echo "process() required argument \$1 missing"
+	return 1
+    fi
+
     module_title $1 $2
 
     SRCDIR=""
-- 
1.7.3.1.45.g9855b



More information about the xorg-devel mailing list