Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/distrib/sets Add a new arg to override the value of the "set...



details:   https://anonhg.NetBSD.org/src/rev/4b4819269057
branches:  trunk
changeset: 807893:4b4819269057
user:      martin <martin%NetBSD.org@localhost>
date:      Sun Apr 26 09:21:36 2015 +0000

description:
Add a new arg to override the value of the "setlistdir" variable (that is:
where the mtree spec files are created)

diffstat:

 distrib/sets/maketars |  19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

diffs (73 lines):

diff -r b5955d889da4 -r 4b4819269057 distrib/sets/maketars
--- a/distrib/sets/maketars     Sun Apr 26 09:20:09 2015 +0000
+++ b/distrib/sets/maketars     Sun Apr 26 09:21:36 2015 +0000
@@ -1,10 +1,11 @@
 #!/bin/sh
 #
-# $NetBSD: maketars,v 1.80 2013/02/07 16:27:41 christos Exp $
+# $NetBSD: maketars,v 1.81 2015/04/26 09:21:36 martin Exp $
 #
 # Make release tar files for some or all lists.  Usage:
 # maketars [-b] [-x] [-i installdir] [-a arch] [-m machine] [-s setsdir]
-#      [-M metalog] [-N etcdir] [-d destdir] [-t tardir] [setname ...]
+#      [-M metalog] [-N etcdir] [-F setlistsdir] [-d destdir]
+#      [-t tardir] [setname ...]
 #
 # The default sets are "base comp debug etc games man misc tests text"
 # The X sets are "xbase xcomp xdebug xetc xfont xserver"
@@ -26,6 +27,7 @@
 metalog=
 installdir=
 etcdir=
+setlistdir=
 setfilesonly=false
 quiet=false
 skipkeys=time,md5,sha1,sha384,sha512,rmd160,cksum
@@ -33,8 +35,9 @@
 usage()
 {
        cat 1>&2 <<USAGE
-Usage: ${prog} [-L base,x,ext] [-b] [-x] [-y] [-i idir] [-a arch] [-m machine] [-s setsdir] [-S]
-           [-M metalog] [-N etcdir] [-d dest] [-t targetdir] [setname ...]
+Usage: ${prog} [-L base,x,ext] [-b] [-x] [-y] [-i idir] [-a arch] [-m machine]
+           [-s setsdir] [-S] [-M metalog] [-N etcdir] [-F setlistdir]
+           [-d dest] [-t targetdir] [setname ...]
        -L base,x,ext   Make specified lists
        -b              Make both netbsd and x11 lists
        -x              Only make x11 lists
@@ -46,6 +49,7 @@
        -m machine      Set machine (e.g, amiga, i386, macppc) [${MACHINE}]
        -q              Quiet operation
        -s setsdir      Directory to find sets [${setsdir}]
+       -F setlistdir   output directory for generated set lists [${dest}/etc/mtree/]
        -S              Exit after creating set files ${dest}/etc/mtree/set.*
        -M metalog      metalog file
        -N etcdir       etc dir for metalog use [${dest}/etc]
@@ -62,7 +66,7 @@
 }
 
 # handle args
-while getopts L:bxyi:a:m:qs:SM:N:d:t: ch; do
+while getopts L:bxyi:a:m:qs:F:SM:N:d:t: ch; do
        case ${ch} in
        L)
                save_IFS="${IFS}"
@@ -102,6 +106,9 @@
        s)
                setsdir="${OPTARG}"
                ;;
+       F)
+               setlistdir="${OPTARG}"
+               ;;
        S)
                setfilesonly=true
                ;;
@@ -144,7 +151,7 @@
 SDIR="$(${MKTEMP} -d "/tmp/${prog}.XXXXXX")"
 TMPFILES=
 
-setlistdir="${dest}/etc/mtree"
+: ${setlistdir:="${dest}/etc/mtree"}
 
 cleanup()
 {



Home | Main Index | Thread Index | Old Index