From af4e703c55113f6a87670c4da172f6db19aa72e0 Mon Sep 17 00:00:00 2001 From: dmcmahill Date: Wed, 13 Nov 2002 11:12:04 +0000 Subject: add a -S,--save-database option which doesn't delete the database files after the run. Useful for debugging since this preserves the intermediate result of the most time consuming portion of the script. --- mk/bulk/mkreadme | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'mk/bulk') 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" -- cgit v1.2.3