diff options
author | M Joonas Pihlaja <jpihlaja@cc.helsinki.fi> | 2009-09-02 04:09:46 +0100 |
---|---|---|
committer | M Joonas Pihlaja <jpihlaja@cc.helsinki.fi> | 2009-09-02 06:33:22 +0300 |
commit | c87b366bfec4eeda2646b33cb8a33822a301456c (patch) | |
tree | 94dc460521d7eb700878388a80cb68660d54ba1b | |
parent | b509b548b1e3ac5a9e3de2f9652cd1973d295fa3 (diff) | |
download | cairo-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.sh | 7 | ||||
-rw-r--r-- | test/make-cairo-test-constructors.sh | 7 |
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! */ |