diff options
author | phk <phk@FreeBSD.org> | 2006-03-09 14:43:07 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2006-03-09 14:43:07 +0000 |
commit | 5a08101277f497a6a92cb123d1f1e2dbfb3abb22 (patch) | |
tree | 415ee43ece8ca45c8c284f6cf810d82c35eeef44 /tools | |
parent | 4f01c7cf85d284703b8a845c36ce2d7db51db172 (diff) | |
download | FreeBSD-src-5a08101277f497a6a92cb123d1f1e2dbfb3abb22.zip FreeBSD-src-5a08101277f497a6a92cb123d1f1e2dbfb3abb22.tar.gz |
In addition to -b (suppress builds) add -k (suppress kernel build) and
-w (suppress world).
Diffstat (limited to 'tools')
-rw-r--r-- | tools/tools/nanobsd/nanobsd.sh | 47 |
1 files changed, 37 insertions, 10 deletions
diff --git a/tools/tools/nanobsd/nanobsd.sh b/tools/tools/nanobsd/nanobsd.sh index 1be2c7c..64a1c3f 100644 --- a/tools/tools/nanobsd/nanobsd.sh +++ b/tools/tools/nanobsd/nanobsd.sh @@ -461,16 +461,30 @@ customize_cmd () { # ####################################################################### +usage () { + ( + echo "Usage: $0 [-b/-k/-w] [-c config_file]" + echo " -b suppress builds (both kernel and world)" + echo " -k suppress buildkernel" + echo " -w suppress buildworld" + echo " -c specify config file" + ) 1>&2 + exit 2 +} + ####################################################################### # Parse arguments -do_build=true +do_kernel=true +do_world=true -args=`getopt bc:h $*` +set +e +args=`getopt bc:hkw $*` if [ $? -ne 0 ] ; then - echo "Usage: $0 [-c config file]" 1>&2 + usage exit 2 fi +set -e set -- $args for i @@ -479,7 +493,12 @@ do in -b) shift; - do_build=false + do_world=false + do_kernel=false + ;; + -k) + shift; + do_kernel=false ;; -c) . "$2" @@ -487,8 +506,11 @@ do shift; ;; -h) - echo "Usage: $0 [-b] [-c config file]" - exit 2 + usage + ;; + -w) + shift; + do_world=false ;; --) shift; @@ -497,8 +519,8 @@ do done if [ $# -gt 0 ] ; then - echo "Extraneous arguments" - exit 2 + echo "$0: Extraneous arguments supplied" + usage fi ####################################################################### @@ -547,13 +569,18 @@ export NANO_WORLDDIR ####################################################################### # And then it is as simple as that... -if $do_build ; then +if $do_world ; then clean_build make_conf_build build_world +else + echo "## Skipping buildworld (as instructed)" +fi + +if $do_kernel ; then build_kernel else - echo "## Skipping build steps (as instructed)" + echo "## Skipping buildkernel (as instructed)" fi clean_world |