diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2019-02-23 21:19:04 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2019-02-23 21:19:04 +0000 |
commit | 4746651327e08b2ce6a509081b5964b09a056a90 (patch) | |
tree | 531637727db85086906f513c6f0bacae03d39740 /maintainer-scripts | |
parent | 3c26b7598c6d800dcc037a66f2dacf80728fb480 (diff) | |
download | gcc-4746651327e08b2ce6a509081b5964b09a056a90.tar.gz |
Improve error message for bad arguments to script
* generate_libstdcxx_web_docs: Improve error output.
From-SVN: r269169
Diffstat (limited to 'maintainer-scripts')
-rw-r--r-- | maintainer-scripts/ChangeLog | 4 | ||||
-rwxr-xr-x | maintainer-scripts/generate_libstdcxx_web_docs | 14 |
2 files changed, 17 insertions, 1 deletions
diff --git a/maintainer-scripts/ChangeLog b/maintainer-scripts/ChangeLog index 30c6f5101a7..ced78651db3 100644 --- a/maintainer-scripts/ChangeLog +++ b/maintainer-scripts/ChangeLog @@ -1,3 +1,7 @@ +2019-02-23 Jonathan Wakely <jwakely@redhat.com> + + * generate_libstdcxx_web_docs: Improve error output. + 2018-11-22 Martin Liska <mliska@suse.cz> * bugzilla-close-candidate.py: New file. diff --git a/maintainer-scripts/generate_libstdcxx_web_docs b/maintainer-scripts/generate_libstdcxx_web_docs index 00ebcbf7f67..74886356bc7 100755 --- a/maintainer-scripts/generate_libstdcxx_web_docs +++ b/maintainer-scripts/generate_libstdcxx_web_docs @@ -3,16 +3,28 @@ # i.e. http://gcc.gnu.org/onlinedocs/gcc-x.y.z/libstdc++* SRCDIR=${1} -DOCSDIR=$(realpath ${2}) +DOCSDIR=${2} if ! [ $# -eq 2 -a -x "${SRCDIR}/configure" -a -d "${DOCSDIR}" ] then + if ! [ $# -eq 2 ] + then + echo "$0: Wrong number of arguments" >&2 + elif ! [ -x "${SRCDIR}/configure" ] + then + echo "$0: No executable configure script found in $SRCDIR" >&2 + elif ! [ -d "${DOCSDIR}" ] + then + echo "$0: Output directory does not exist: $DOCSDIR" >&2 + fi echo "Usage: $0 <gcc src dir> <doc output dir>" >&2 exit 1 fi set -e +DOCSDIR=$(realpath ${DOCSDIR}) + # Check we have some of the required tools for i in doxygen dot dblatex pdflatex makeindex do |