pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/scripts Add more error checking. PACKAGES must exi...
details: https://anonhg.NetBSD.org/pkgsrc/rev/f70ff68859cf
branches: trunk
changeset: 494489:f70ff68859cf
user: dmcmahill <dmcmahill%pkgsrc.org@localhost>
date: Tue May 24 21:48:22 2005 +0000
description:
Add more error checking. PACKAGES must exist. No extra command line args taken.
diffstat:
mk/scripts/binpkg-cache | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diffs (29 lines):
diff -r 18f10dc21a5b -r f70ff68859cf mk/scripts/binpkg-cache
--- a/mk/scripts/binpkg-cache Tue May 24 21:29:59 2005 +0000
+++ b/mk/scripts/binpkg-cache Tue May 24 21:48:22 2005 +0000
@@ -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 @@
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
Home |
Main Index |
Thread Index |
Old Index