summaryrefslogtreecommitdiff
path: root/mk/bulk
diff options
context:
space:
mode:
authordmcmahill <dmcmahill>2002-11-14 14:05:46 +0000
committerdmcmahill <dmcmahill>2002-11-14 14:05:46 +0000
commit46ba131e910ca3c6d1d1966905380d10051a098f (patch)
tree2c05f389e80ce3cde7e7d14569ea6162b5b3d245 /mk/bulk
parent1137fe346906c1fd7d15457083325c3a71b79a1a (diff)
downloadpkgsrc-46ba131e910ca3c6d1d1966905380d10051a098f.tar.gz
- when creating a new database, make sure that the old one is gone first to
avoid simply appending to it. - add some additional error checks when using the -r/--restart options to make sure that the database exists and give a useful error message if it doesn't
Diffstat (limited to 'mk/bulk')
-rwxr-xr-xmk/bulk/mkreadme13
1 files changed, 12 insertions, 1 deletions
diff --git a/mk/bulk/mkreadme b/mk/bulk/mkreadme
index 3a55a73acf2..2999869616b 100755
--- a/mk/bulk/mkreadme
+++ b/mk/bulk/mkreadme
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: mkreadme,v 1.7 2002/11/13 15:12:17 dmcmahill Exp $
+# $NetBSD: mkreadme,v 1.8 2002/11/14 14:05:46 dmcmahill Exp $
#
# Script for README.html generation
#
@@ -340,6 +340,10 @@ if [ "x$restart" = "xno" ] ; then
echo "Extracting data. This could take a while"
echo " "
npkg=1
+
+ # make sure we don't have an old database lying around
+ rm -fr $DATABASEFILE
+
cd ${PKGSRCDIR}
list=`grep '^[[:space:]]*'SUBDIR */Makefile | sed 's,/Makefile.*=[[:space:]]*,/,'`
for pkgdir in $list
@@ -375,6 +379,13 @@ else
echo " "
echo "Using existing database (are you sure you wanted the -r/--restart flag?)"
echo " "
+ if [ ! -f $DATABASEFILE ]; then
+ echo " "
+ echo "ERROR: You have use the -r/--restart flag but the database "
+ echo " file $DATABASEFILE does not exist"
+ echo " "
+ exit 1
+ fi
fi
######################################################################