Correct typo, bad copy/paste
This commit is contained in:
parent
28f940ccda
commit
99e039dbc3
|
@ -36,7 +36,6 @@
|
|||
## For better speed, you may want to define the options in source code yourself, so they do not need to be parsed from the documentation. The side effect is
|
||||
## that when changing them, you will need to update both the documentation and the source code. You define the options statically like this:
|
||||
##
|
||||
##
|
||||
## options=(o=option some-boolean some-value=?)
|
||||
##
|
||||
show_error() {
|
||||
|
@ -123,9 +122,6 @@ parse_options() {
|
|||
for known_option in "${options[@]}" "${short_option_vars[@]}"; do
|
||||
known_option_var=${known_option#*=}
|
||||
known_option_name=${known_option%=$known_option_var}
|
||||
# Short option
|
||||
if [[ "$option" = "$known_option_name" ]]; then
|
||||
|
||||
# Short option
|
||||
if [[ "$option" = "$known_option_name" ]]; then
|
||||
option_value="yes"
|
||||
|
@ -163,8 +159,6 @@ parse_options() {
|
|||
fi
|
||||
done
|
||||
# Unknown option
|
||||
if [[ -z "$option_value" ]]; then
|
||||
# Unknown option
|
||||
if [[ -z "$option_value" ]]; then
|
||||
option=${option%%=*}
|
||||
[[ "$option" = \?* ]] && option=${option#*\?}
|
||||
|
@ -180,5 +174,3 @@ parse_options() {
|
|||
done
|
||||
}
|
||||
parse_options "$@"
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
https://github.com/renatosilva/easyoptions
|
||||
EasyOptions is distributed under the terms of the New BSD License (3-clause): Copyright (c) 2013, 2014 Renato Silva
|
||||
https://github.com/renatosilva/easyoptions EasyOptions is distributed under the terms of the New BSD License (3-clause): Copyright (c) 2013, 2014 Renato Silva
|
||||
<br.renatosilva@gmail.com> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
|
||||
following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright
|
||||
|
@ -15,4 +14,3 @@ COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL
|
|||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
OF SUCH DAMAGE.
|
||||
|
||||
|
|
Loading…
Reference in New Issue