Commit bc6b4b63 authored by Emeric Verschuur's avatar Emeric Verschuur Committed by Emeric Verschuur
Browse files

spelling & interactive mode fixes

parent 4837f0f1
Pipeline #73 passed with stage
in 17 seconds
...@@ -99,7 +99,7 @@ bashopts_process_opts ...@@ -99,7 +99,7 @@ bashopts_process_opts
## Example ## Example
```bash ```bash
#!/bin/bash -ei #!/bin/bash -e
# load the library # load the library
. bashopts.sh . bashopts.sh
......
...@@ -238,7 +238,7 @@ bashopts_declare() { ...@@ -238,7 +238,7 @@ bashopts_declare() {
*) bashopts_critical "Fatal error";; *) bashopts_critical "Fatal error";;
esac esac
done done
# Check imcompatible -v and -r options # Check incompatible -v and -r options
if [ -n "${options[default]}" ] && [ "${options[req_value]}" == "true" ]; then if [ -n "${options[default]}" ] && [ "${options[req_value]}" == "true" ]; then
bashopts_critical "bashopts_declare: -r and -v options cannot be activated at the same time" bashopts_critical "bashopts_declare: -r and -v options cannot be activated at the same time"
fi fi
...@@ -362,7 +362,7 @@ bashopts_dump_value() { ...@@ -362,7 +362,7 @@ bashopts_dump_value() {
# display the formated help # display the formated help
bashopts_diplay_help() { bashopts_diplay_help() {
local elts optargs_max_len=8 val dval ncol=$COLUMNS local elts optargs_max_len=8 val dval ncol=$(tput cols 2>/dev/null || true)
declare -A optargs declare -A optargs
# compute the good arguments comumn size # compute the good arguments comumn size
for op in "${bashopts_optlist[@]}"; do for op in "${bashopts_optlist[@]}"; do
......
#!/bin/bash -ei #!/bin/bash -e
# load the library # load the library
. bashopts.sh . bashopts.sh
......
#!/bin/bash -ei #!/bin/bash -e
# Copyright 2017 Emeric Verschuur <emeric@mbedsys.org> # Copyright 2017 Emeric Verschuur <emeric@mbedsys.org>
# #
# Licensed to the Apache Software Foundation (ASF) under one # Licensed to the Apache Software Foundation (ASF) under one
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
# under the License. # under the License.
if [ "$GITLAB_CI" != "true" ]; then if [ "$GITLAB_CI" != "true" ]; then
exec docker run --rm -ti -e GITLAB_CI=true -v $PWD:$PWD -w $PWD ubuntu:16.04 ./test.sh "$@" exec docker run --rm -i -e GITLAB_CI=true -v $PWD:$PWD -w $PWD ubuntu:16.04 ./test.sh "$@"
fi fi
. bashopts.sh . bashopts.sh
...@@ -288,7 +288,7 @@ _test_case_19() { ...@@ -288,7 +288,7 @@ _test_case_19() {
bashopts_parse_args -b bashopts_parse_args -b
bashopts_process_opts bashopts_process_opts
req_test_eq "$a_boolean_value" "true" req_test_eq "$a_boolean_value" "true"
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment