diff options
author | dmcmahill <dmcmahill@pkgsrc.org> | 2002-11-13 11:12:04 +0000 |
---|---|---|
committer | dmcmahill <dmcmahill@pkgsrc.org> | 2002-11-13 11:12:04 +0000 |
commit | 1e48a03c4bf9d0373f7893b1c43a6666897f888f (patch) | |
tree | dc7a361cfa2fd38ce3535196a9ea40955e9cec9d /mk/bulk | |
parent | 449b9f7388f441ca7287103d6fb68578a841bd48 (diff) | |
download | pkgsrc-1e48a03c4bf9d0373f7893b1c43a6666897f888f.tar.gz |
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.
Diffstat (limited to 'mk/bulk')
-rwxr-xr-x | mk/bulk/mkreadme | 19 |
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" |