summaryrefslogtreecommitdiff
path: root/mk/bulk
diff options
context:
space:
mode:
Diffstat (limited to 'mk/bulk')
-rwxr-xr-xmk/bulk/mkreadme19
1 files changed, 15 insertions, 4 deletions
diff --git a/mk/bulk/mkreadme b/mk/bulk/mkreadme
index dc13e0c94f5..ab4facc9981 100755
--- a/mk/bulk/mkreadme
+++ b/mk/bulk/mkreadme
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: mkreadme,v 1.5 2002/11/13 10:14:04 dmcmahill Exp $
+# $NetBSD: mkreadme,v 1.6 2002/11/13 11:12:04 dmcmahill Exp $
#
# Script for README.html generation
#
@@ -49,7 +49,7 @@ usage(){
echo "Usage: $prog [-c|--cdrom] [-C|--prune] [-d|--debug] [-f|--ftp] "
echo " [-m|--multi-arch] [-p|--pkgsrc directory] "
echo " [-P|--packages directory] [-r|--restart] "
- echo " [-s|--single-arch]"
+ echo " [-s|--single-arch] [-S|--save-database]"
echo " "
echo " $prog -h|--help"
echo " "
@@ -85,6 +85,10 @@ usage(){
echo " -s|--single-arch Assumes a single OS release and MACHINE_ARCH binary"
echo " packages directory structure."
echo " "
+ echo " -S|--save-database Does not delete the database file after the run."
+ echo " This is useful for debugging or re-running this script"
+ echo " with the -r option."
+ echo " "
echo " -v|--version Displays the version of this script and exits."
echo " "
echo "Example: $prog -p /pub/NetBSD/packages/pkgsrc -P /pub/NetBSD/packages -m -f"
@@ -92,7 +96,7 @@ usage(){
}
clean_and_exit(){
- if [ "x$DEBUG" = "xno" -a "x$restart" = "xno" ]; then
+ if [ "x$DEBUG" = "xno" -a "x$restart" = "xno" -a "x$save" = "xno" ]; then
rm -fr $TMPDIR
else
echo "Debugging output left in $TMP"
@@ -113,6 +117,7 @@ ftp_readme=no
restart=no
prune=no
DEBUG=no
+save=no
while
test -n "$1"
@@ -181,6 +186,12 @@ do
shift
;;
+ # Save the database files
+ -S|--save-database)
+ save=yes
+ shift
+ ;;
+
# Version
-v|--version)
${AWK} '/^#[ \t]*\$NetBSD/ {gsub(/,v/,"",$3);printf("%s: Version %s, %s\n",$3,$4,$5); exit 0;}' $prog
@@ -452,7 +463,7 @@ fi
echo " "
echo "README.html generation finished: `date`"
echo " "
-if [ "x$DEBUG" = "xno" -a "x$restart" = "xno" ]; then
+if [ "x$DEBUG" = "xno" -a "x$restart" = "xno" -a "x$save" = "xno" ]; then
rm -fr $TMPDIR
else
echo "Debugging output left in $TMPDIR"