Skip to content

Commit ae5afb0

Browse files
committed
Remove nonsensical --no-datastream option
Keep only the --datastream option, which builds the CMake target that generates the data stream files, in addition to any other target defined during script invocation.
1 parent ba8e930 commit ae5afb0

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

build_product

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# ARG_OPTIONAL_BOOLEAN([ansible-playbooks],[],[Build Ansible Playbooks for every profile],[on])
1010
# ARG_OPTIONAL_BOOLEAN([bash-scripts],[],[Build Bash remediation scripts for every profile],[on])
1111
# ARG_OPTIONAL_BOOLEAN([datastream-only],[d],[Build the data stream only. Do not build any of the guides, tables, etc],[off])
12-
# ARG_OPTIONAL_BOOLEAN([datastream],[],[Build the data stream. Do not build any of the guides, tables, etc],[off])
12+
# ARG_OPTIONAL_ACTION([datastream],[],[Build the data stream. Do not build any of the guides, tables, etc])
1313
# ARG_OPTIONAL_SINGLE([cel-content],[],[Product(s) to build CEL content for (comma-separated)],[off])
1414
# ARG_OPTIONAL_BOOLEAN([profiling],[p],[Use ninja and call the build_profiler.sh util],[off])
1515
# ARG_USE_ENV([ADDITIONAL_CMAKE_OPTIONS],[],[Whitespace-separated string of arguments to pass to CMake])
@@ -76,7 +76,7 @@ _arg_render_test_scenarios="off"
7676
print_help()
7777
{
7878
printf '%s\n' "Wipes out contents of the 'build' directory and builds only and only the given products."
79-
printf 'Usage: %s [-b|--builder <BUILDER>] [-j|--jobs <arg>] [--(no-)debug] [--(no-)derivatives] [--(no-)ansible-playbooks] [--(no-)bash-scripts] [-d|--(no-)datastream-only] [-p|--(no-)profiling] [-h|--help] [<product-1>] ... [<product-n>] ...\n' "$0"
79+
printf 'Usage: %s [-b|--builder <BUILDER>] [-j|--jobs <arg>] [--(no-)debug] [--(no-)derivatives] [--(no-)ansible-playbooks] [--(no-)bash-scripts] [-d|--(no-)datastream-only] [--datastream] [-p|--(no-)profiling] [-h|--help] [<product-1>] ... [<product-n>] ...\n' "$0"
8080
printf '\t%s\n' "<product>: Products to build, ALL means all products (defaults for <product>: 'ALL')"
8181
printf '\t%s\n' "-b, --builder: Builder engine. Can be one of: 'make', 'ninja' and 'auto' (default: 'auto')"
8282
printf '\t%s\n' "-j, --jobs: Count of simultaneous jobs (default: 'auto')"
@@ -88,7 +88,7 @@ print_help()
8888
printf '\t%s\n' "-t, --thin, --no-thin: Build thin data streams for each rule. Do not build any of the guides, tables, etc (off by default)"
8989
printf '\t%s\n' "-r, --rule-id: Rule ID: Build a thin data stream with the specified rule. Do not build any of the guides, tables, etc (off by default)"
9090
printf '\t%s\n' "-d, --datastream-only, --no-datastream-only: Build the data stream only. Do not build any of the guides, tables, etc (off by default)"
91-
printf '\t%s\n' "--datastream, --no-datastream: Build the data stream. Do not build any of the guides, tables, etc (off by default)"
91+
printf '\t%s\n' "--datastream: Build the data stream. Do not build any of the guides, tables, etc"
9292
printf '\t%s\n' "--cel-content: Product(s) to build CEL content for (comma-separated) (default: 'off')"
9393
printf '\t%s\n' "--render-test-scenarios: render Automatus test scenarios for specified product and put them into the build directory (off by default)"
9494
printf '\t%s\n' "-p, --profiling, --no-profiling: Use ninja and call the build_profiler.sh util (off by default)"
@@ -184,9 +184,8 @@ parse_commandline()
184184
{ begins_with_short_option "$_next" && shift && set -- "-d" "-${_next}" "$@"; } || die "The short option '$_key' can't be decomposed to ${_key:0:2} and -${_key:2}, because ${_key:0:2} doesn't accept value and '-${_key:2:1}' doesn't correspond to a short option."
185185
fi
186186
;;
187-
--no-datastream|--datastream)
187+
--datastream)
188188
_arg_datastream_only="on"
189-
test "${1:0:5}" = "--no-" && _arg_datastream_only="off"
190189
;;
191190
--cel-content)
192191
test $# -lt 2 && die "Missing value for the optional argument '$_key'." 1

0 commit comments

Comments
 (0)