In addition to -b (suppress builds) add -k (suppress kernel build) and
-w (suppress world).
This commit is contained in:
parent
4f01c7cf85
commit
5a08101277
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user