summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorM Joonas Pihlaja <jpihlaja@cc.helsinki.fi>2009-09-02 04:09:46 +0100
committerM Joonas Pihlaja <jpihlaja@cc.helsinki.fi>2009-09-02 06:33:22 +0300
commitc87b366bfec4eeda2646b33cb8a33822a301456c (patch)
tree94dc460521d7eb700878388a80cb68660d54ba1b
parentb509b548b1e3ac5a9e3de2f9652cd1973d295fa3 (diff)
downloadcairo-c87b366bfec4eeda2646b33cb8a33822a301456c.tar.gz
[constructors] Guard against being called without any input files.
The make-cairo-(test|boilerplate)-constructors scripts ought never to be called without arguments lest we are left constructorless.
-rw-r--r--boilerplate/make-cairo-boilerplate-constructors.sh7
-rw-r--r--test/make-cairo-test-constructors.sh7
2 files changed, 12 insertions, 2 deletions
diff --git a/boilerplate/make-cairo-boilerplate-constructors.sh b/boilerplate/make-cairo-boilerplate-constructors.sh
index 2c7fc85e8..dd6311178 100644
--- a/boilerplate/make-cairo-boilerplate-constructors.sh
+++ b/boilerplate/make-cairo-boilerplate-constructors.sh
@@ -1,4 +1,9 @@
-#!/bin/sh
+#! /bin/sh
+
+if test $# == 0; then
+ echo "$0: no input files." >&2
+ exit 0
+fi
cat <<HERE
/* WARNING: Autogenerated file - see $0! */
diff --git a/test/make-cairo-test-constructors.sh b/test/make-cairo-test-constructors.sh
index d0325e876..fdb84e9dc 100644
--- a/test/make-cairo-test-constructors.sh
+++ b/test/make-cairo-test-constructors.sh
@@ -1,4 +1,9 @@
-#!/bin/sh
+#! /bin/sh
+
+if test $# == 0; then
+ echo "$0: no input files." >&2
+ exit 0
+fi
cat <<HERE
/* WARNING: Autogenerated file - see $0! */