diff options
author | dmcmahill <dmcmahill@pkgsrc.org> | 2005-05-24 21:48:22 +0000 |
---|---|---|
committer | dmcmahill <dmcmahill@pkgsrc.org> | 2005-05-24 21:48:22 +0000 |
commit | 4d8ac6499d6241242df7c9a7b4ec1a48b59447b9 (patch) | |
tree | 010088051be898310c7262fdd0e89ae2a05adc1f /mk/scripts | |
parent | 0af64c1afe1448bfb6e5e5bc0f1a47a6ce661438 (diff) | |
download | pkgsrc-4d8ac6499d6241242df7c9a7b4ec1a48b59447b9.tar.gz |
Add more error checking. PACKAGES must exist. No extra command line args taken.
Diffstat (limited to 'mk/scripts')
-rwxr-xr-x | mk/scripts/binpkg-cache | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/mk/scripts/binpkg-cache b/mk/scripts/binpkg-cache index d38a372dba0..81d0d0f3398 100755 --- a/mk/scripts/binpkg-cache +++ b/mk/scripts/binpkg-cache @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: binpkg-cache,v 1.5 2005/05/24 20:56:47 dmcmahill Exp $ +# $NetBSD: binpkg-cache,v 1.6 2005/05/24 21:48:22 dmcmahill Exp $ # # Script for generating a cache file with information about # all binary packages contained in a directory. @@ -318,6 +318,17 @@ do esac done +if test $# -ne 0 ; then + echo "$0: $* is invalid" + usage + clean_and_exit1 +fi + +if test ! -d ${PACKAGES} ; then + echo "Packages directory ${PACKAGES} seems to be missing" + clean_and_exit1 +fi + # put a trailing / after ${PACKAGES} in case ${PACKAGES} is # a link. for d in `${FIND} ${PACKAGES}/ -type d -print` ; do |