diff options
-rwxr-xr-x | bootstrap/bootstrap | 12 | ||||
-rwxr-xr-x | bootstrap/mkbinarykit | 10 |
2 files changed, 19 insertions, 3 deletions
diff --git a/bootstrap/bootstrap b/bootstrap/bootstrap index 54f31e6e0ae..06f75513cca 100755 --- a/bootstrap/bootstrap +++ b/bootstrap/bootstrap @@ -1,6 +1,6 @@ #! /bin/sh -# $NetBSD: bootstrap,v 1.101 2007/07/27 10:43:24 joerg Exp $ +# $NetBSD: bootstrap,v 1.102 2007/07/29 17:09:47 joerg Exp $ # # # Copyright (c) 2001-2002 Alistair G. Crooks. All rights reserved. @@ -70,6 +70,7 @@ usage="Usage: $0 "' [ --unprivileged | --ignore-user-check ] [ --preserve-path ] [ --compiler <compiler> ] + [ --mk-fragment <mk.conf> ] [ --full ] [ --quiet ] [ --help ]' @@ -275,6 +276,7 @@ varbase= full=no compiler="" quiet=no +mk_fragment= while [ $# -gt 0 ]; do case $1 in @@ -297,6 +299,10 @@ while [ $# -gt 0 ]; do --ignore-case-check) ignorecasecheck=yes ;; --unprivileged | --ignore-user-check) ignoreusercheck=yes ;; --preserve-path) preserve_path=yes ;; + --mk-fragment=*) + mk_fragment=`get_optarg "$1"` ;; + --mk-fragment) + mk_fragment="$2"; shift ;; --full) full=yes ;; --quiet) quiet=yes ;; --help) echo "$usage"; exit ;; @@ -889,6 +895,10 @@ echo "WRKOBJDIR= ${wrkdir}/wrk" >> ${BOOTSTRAP_MKCONF} echo "" >> ${TARGET_MKCONF} echo "" >> ${BOOTSTRAP_MKCONF} +if test -n "${mk_fragment}"; then + cat "${mk_fragment}" >> ${TARGET_MKCONF} + echo "" >> ${TARGET_MKCONF} +fi echo ".endif # end pkgsrc settings" >> ${TARGET_MKCONF} echo ".endif # end pkgsrc settings" >> ${BOOTSTRAP_MKCONF} diff --git a/bootstrap/mkbinarykit b/bootstrap/mkbinarykit index 5fc934d5e8a..905532705f0 100755 --- a/bootstrap/mkbinarykit +++ b/bootstrap/mkbinarykit @@ -1,6 +1,6 @@ #!/bin/sh -# $NetBSD: mkbinarykit,v 1.23 2007/05/27 19:55:58 schmonz Exp $ +# $NetBSD: mkbinarykit,v 1.24 2007/07/29 17:09:52 joerg Exp $ # # Make a binary bootstrap kit and place it in targetdir (or current # working directory if not specified). The mk.conf.example file is @@ -52,7 +52,7 @@ die() usage="Usage: $0 "' [ --force ] [ --targetdir=<tar target dir> ] [ --mkconf=<target> ] [ --no-build ] [ --workdir=<work dir> ] [ bootstrap script arguments ] - [ --fetch-cmd=<ftp command> ]' + [ --fetch-cmd=<ftp command> ] [ --mk-fragment=<mk.conf> ]' opsys=`uname -s | tr -d /-` osrev=`uname -r` @@ -63,6 +63,7 @@ prefix=/usr/pkg sysconfdir=$prefix/etc pkgdbdir=/var/db/pkg mkfile= +mk_fragment= ignorecasecheck=no ignoreusercheck=no force=no @@ -133,6 +134,8 @@ while [ $# -gt 0 ]; do --prefix=*) prefix=`echo $1 | $sedprog -e 's|--prefix=||'` ;; --fetch-cmd=*) fetch_cmd="$1" ;; --mkconf=*) mkfile=`echo $1 | $sedprog -e 's|--mkconf=||'` ;; + --mk-fragment=*) + mk_fragment="$1" ;; --pkgdbdir=*) pkgdbdir=`echo $1 | $sedprog -e 's|--pkgdbdir=||'` ;; --ignore-case-check) ignorecasecheck=yes ;; --ignore-user-check) ignoreusercheck=yes ;; @@ -163,6 +166,9 @@ if [ "$build" != "no" ]; then if [ "$ignorecasecheck" = "yes" ]; then bootstrap_flags="$bootstrap_flags --ignore-case-check" fi + if [ -n "${mk_fragment}" ]; then + bootstrap_flags="$bootstrap_flags ${mk_fragment}" + fi if [ "$ignoreusercheck" = "yes" ]; then bootstrap_flags="$bootstrap_flags --ignore-user-check" |