mirror of
https://github.com/kvz/bash3boilerplate.git
synced 2025-02-10 11:01:08 +00:00
* Add support for declaring arguments as repeatable If the usage of the argument includes the phrase "Can be repeated.", the corresponding arg_ variable will be an array containing one element per instance of the argument. * Add example and test for using repeated parameters * Add example and test for using repeated flags
20 lines
574 B
Bash
20 lines
574 B
Bash
#!/usr/bin/env bash
|
|
# set -o pipefail
|
|
# set -o errexit
|
|
set -o nounset
|
|
# set -o xtrace
|
|
|
|
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
__root="$(cd "$(dirname "$(dirname "$(dirname "${__dir}")")")" && pwd)"
|
|
|
|
echo "ACCPTST:STDIO_REPLACE_DATETIMES"
|
|
|
|
(
|
|
env LOG_LEVEL=6 bash "${__root}/main.sh" -f dummy -i simple_input -i "input_in_quotes" -i "input with spaces" -i "input with \"quotes\"" -i last_input
|
|
) 2>&1 |grep arg_i -A 5
|
|
|
|
(
|
|
env LOG_LEVEL=6 bash "${__root}/main.sh" -x -f dummy -x -x
|
|
env LOG_LEVEL=6 bash "${__root}/main.sh" -f dummy -xxxx
|
|
) 2>&1 |grep arg_x
|