summaryrefslogtreecommitdiff
path: root/mk/bulk
diff options
context:
space:
mode:
authordmcmahill <dmcmahill>2002-11-13 11:12:04 +0000
committerdmcmahill <dmcmahill>2002-11-13 11:12:04 +0000
commitaf4e703c55113f6a87670c4da172f6db19aa72e0 (patch)
treedc7a361cfa2fd38ce3535196a9ea40955e9cec9d /mk/bulk
parent6c9974df34a956e8e8a6c253ea29d6d9b4e1238b (diff)
downloadpkgsrc-af4e703c55113f6a87670c4da172f6db19aa72e0.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-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"