diff options
author | rofl0r <retnyg@gmx.net> | 2018-12-15 03:00:31 +0000 |
---|---|---|
committer | rofl0r <retnyg@gmx.net> | 2018-12-15 03:00:31 +0000 |
commit | c746a33521f7a8b0650235420f027940778b4058 (patch) | |
tree | 1f6332ca9fd962983202f52c31ade87c398233bf | |
parent | 58187329ad9f00eb8c39379e7ee0b608dd14bab8 (diff) | |
download | gettext-tiny-c746a33521f7a8b0650235420f027940778b4058.tar.gz |
autopoint: add sanity check for configure.ac
a curious user might try to run the script from a random directory expecting
to see help output. in such a case it's better to fail early with an error
message instead of first creating directories and files the user would have
to cleanup manually afterwards.
-rwxr-xr-x | src/autopoint.in | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/autopoint.in b/src/autopoint.in index 3d185e4..ce41116 100755 --- a/src/autopoint.in +++ b/src/autopoint.in @@ -1,6 +1,11 @@ #!/bin/sh m4src=@datadir@/m4 +if ! test -e configure.ac ; then + echo "$0: error: configure.ac not found" >&2 + exit 1 +fi + mkdir -p m4 intl po for i in $m4src/*.m4 ; do cp -f $i m4/ |