Skip to content

Commit

Permalink
Version bump.
Browse files Browse the repository at this point in the history
  • Loading branch information
matejak committed Dec 6, 2017
1 parent b9f3973 commit c607930
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 37 deletions.
2 changes: 1 addition & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
2.5.1 (TBA)
2.5.1 (2017-12-06)
------------------

Bugfixes:
Expand Down
4 changes: 2 additions & 2 deletions bin/argbash
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

version=2.5.0
version=2.5.1
# DEFINE_SCRIPT_DIR()
# ARG_POSITIONAL_SINGLE([input],[The input template file (pass '-' for stdout)])
# ARG_OPTIONAL_SINGLE([output],[o],[Name of the output file (pass '-' for stdout)],[-])
Expand All @@ -14,7 +14,7 @@ version=2.5.0

# ARGBASH_GO()
# needed because of Argbash --> m4_ignore([
### START OF CODE GENERATED BY Argbash v2.5.0 one line above ###
### START OF CODE GENERATED BY Argbash v2.5.1 one line above ###
# Argbash is a bash code generator used to get arguments parsing right.
# Argbash is FREE SOFTWARE, see https://argbash.io for more info

Expand Down
4 changes: 2 additions & 2 deletions bin/argbash-1to2
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#!/bin/bash

version=2.5.0
version=2.5.1
# ARG_POSITIONAL_INF([input],[The input file to transform],[1])
# ARG_OPTIONAL_SINGLE([output],[o],[Name of the output file (pass '-' for stdout and empty string for the same as input file)],[""])
# ARG_VERSION([echo "argbash-1to2 v$version"])
# ARG_HELP([Convert a template for argbash>=1,<2 to argbash>=2,<3])

# ARGBASH_GO()
# needed because of Argbash --> m4_ignore([
### START OF CODE GENERATED BY Argbash v2.5.0 one line above ###
### START OF CODE GENERATED BY Argbash v2.5.1 one line above ###
# Argbash is a bash code generator used to get arguments parsing right.
# Argbash is FREE SOFTWARE, see https://argbash.io for more info

Expand Down
4 changes: 2 additions & 2 deletions bin/argbash-init
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

version=2.5.0
version=2.5.1
# ARG_POSITIONAL_SINGLE([output],[Name of the output template],["-"])
# ARG_OPTIONAL_INCREMENTAL([separate],[s],[Separate the parsing logic (specify two times for complete separation)])
# ARG_OPTIONAL_BOOLEAN([hints],[],[Whether to write hints to the script template])
Expand All @@ -15,7 +15,7 @@ version=2.5.0

# ARGBASH_GO()
# needed because of Argbash --> m4_ignore([
### START OF CODE GENERATED BY Argbash v2.5.0 one line above ###
### START OF CODE GENERATED BY Argbash v2.5.1 one line above ###
# Argbash is a bash code generator used to get arguments parsing right.
# Argbash is FREE SOFTWARE, see https://argbash.io for more info

Expand Down
3 changes: 0 additions & 3 deletions doc/_static/index_script-help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@

<The general help message of my script>
Usage: ./script.sh [--option <arg>] [--(no-)print] [-h|--help] <positional-arg>
<positional-arg>: <positional-arg's help message goes here>
--option: <option's help message goes here> (no default)
--print,--no-print: <print's help message goes here> (off by default)
-h,--help: Prints help
4 changes: 2 additions & 2 deletions doc/_static/index_script-output.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
./script.sh --print --option opt-value pos-value

Value of --option: opt-value
print is on
Value of positional-arg: pos-value
'print' is on
Value of 'positional-arg': pos-value
18 changes: 9 additions & 9 deletions doc/_static/minimal.patch
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
--- minimal-raw.m4 2016-11-04 19:06:36.816634721 +0100
+++ minimal.m4 2016-11-04 19:10:23.043297242 +0100
--- minimal-raw.m4 2017-12-06 23:51:13.985545630 +0100
+++ minimal.m4 2017-12-06 23:54:30.169992192 +0100
@@ -3,16 +3,22 @@
# m4_ignore(
echo "This is just a script template, not the script (yet) - pass it to 'argbash' to fix this." >&2
exit 11 #)Created by argbash-init v@VERSION@
-# ARG_OPTIONAL_SINGLE([option], , [<option's help message goes here>])
-# ARG_OPTIONAL_BOOLEAN([print], , [<print's help message goes here>])
-# ARG_POSITIONAL_SINGLE([positional-arg], [<positional-arg's help message goes here>], )
exit 11 #)Created by argbash-init v2.5.1
-# ARG_OPTIONAL_SINGLE([option])
-# ARG_OPTIONAL_BOOLEAN([print])
-# ARG_POSITIONAL_SINGLE([positional-arg])
-# ARG_HELP([<The general help message of my script>])
+# ARG_OPTIONAL_SINGLE([option], o, [A option with short and long flags and default], [boo])
+# ARG_OPTIONAL_BOOLEAN([print], , [A boolean option with long flag (and implicit default: off)])
Expand All @@ -18,9 +18,9 @@

# [ <-- needed because of Argbash

-echo "Value of --option: $_arg_option"
-echo "print is $_arg_print"
-echo "Value of positional-arg: $_arg_positional_arg"
-printf 'Value of --%s: %s\n' 'option' "$_arg_option"
-printf "'%s' is %s\n" 'print' "$_arg_print"
-printf "Value of '%s': %s\n" 'positional-arg' "$_arg_positional_arg"
+if [ "$_arg_print" = on ]
+then
+ echo "Positional arg value: '$_arg_positional_arg'"
Expand Down
2 changes: 1 addition & 1 deletion doc/_static/wrapper-output-action.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ resources/examples/simple-wrapper.sh --glob '*.m4' ../src ../resources/examples

Contents of '../src' matching '*.m4':
argbash-1to2.m4: 1 kiB
argbash-init.m4: 4 kiB
argbash-init.m4: 5 kiB
argbash-lib.m4: 0 kiB
argbash.m4: 7 kiB
argument_value_types.m4: 4 kiB
Expand Down
14 changes: 7 additions & 7 deletions resources/examples/minimal-raw.m4
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

# m4_ignore(
echo "This is just a script template, not the script (yet) - pass it to 'argbash' to fix this." >&2
exit 11 #)Created by argbash-init v2.5.0
# ARG_OPTIONAL_SINGLE([option], , [<option's help message goes here>])
# ARG_OPTIONAL_BOOLEAN([print], , [<print's help message goes here>])
# ARG_POSITIONAL_SINGLE([positional-arg], [<positional-arg's help message goes here>], )
exit 11 #)Created by argbash-init v2.5.1
# ARG_OPTIONAL_SINGLE([option])
# ARG_OPTIONAL_BOOLEAN([print])
# ARG_POSITIONAL_SINGLE([positional-arg])
# ARG_HELP([<The general help message of my script>])
# ARGBASH_GO

# [ <-- needed because of Argbash

echo "Value of --option: $_arg_option"
echo "print is $_arg_print"
echo "Value of positional-arg: $_arg_positional_arg"
printf 'Value of --%s: %s\n' 'option' "$_arg_option"
printf "'%s' is %s\n" 'print' "$_arg_print"
printf "Value of '%s': %s\n" 'positional-arg' "$_arg_positional_arg"

# ] <-- needed because of Argbash
2 changes: 1 addition & 1 deletion resources/examples/minimal.m4
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# m4_ignore(
echo "This is just a script template, not the script (yet) - pass it to 'argbash' to fix this." >&2
exit 11 #)Created by argbash-init v2.5.0
exit 11 #)Created by argbash-init v2.5.1
# ARG_OPTIONAL_SINGLE([option], o, [A option with short and long flags and default], [boo])
# ARG_OPTIONAL_BOOLEAN([print], , [A boolean option with long flag (and implicit default: off)])
# ARG_POSITIONAL_SINGLE([positional-arg], [Positional arg description], )
Expand Down
6 changes: 3 additions & 3 deletions resources/examples/simple-parsing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# ARGBASH_SET_INDENT([ ])
# ARGBASH_GO()
# needed because of Argbash --> m4_ignore([
### START OF CODE GENERATED BY Argbash v2.5.0 one line above ###
### START OF CODE GENERATED BY Argbash v2.5.1 one line above ###
# Argbash is a bash code generator used to get arguments parsing right.
# Argbash is FREE SOFTWARE, see https://argbash.io for more info

Expand Down Expand Up @@ -95,8 +95,8 @@ parse_commandline ()
handle_passed_args_count ()
{
_required_args_string="'filename'"
test ${#_positionals[@]} -lt 1 && _PRINT_HELP=yes die "FATAL ERROR: Not enough positional arguments - we require exactly 1 (namely: $_required_args_string), but got only ${#_positionals[@]}." 1
test ${#_positionals[@]} -gt 1 && _PRINT_HELP=yes die "FATAL ERROR: There were spurious positional arguments --- we expect exactly 1 (namely: $_required_args_string), but got ${#_positionals[@]} (the last one was: '${_positionals[*]: -1}')." 1
test ${#_positionals[@]} -ge 1 || _PRINT_HELP=yes die "FATAL ERROR: Not enough positional arguments - we require exactly 1 (namely: $_required_args_string), but got only ${#_positionals[@]}." 1
test ${#_positionals[@]} -le 1 || _PRINT_HELP=yes die "FATAL ERROR: There were spurious positional arguments --- we expect exactly 1 (namely: $_required_args_string), but got ${#_positionals[@]} (the last one was: '${_positionals[*]: -1}')." 1
}

assign_positional_args ()
Expand Down
4 changes: 2 additions & 2 deletions resources/examples/simple-wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# ARGBASH_SET_INDENT([ ])
# ARGBASH_GO()
# needed because of Argbash --> m4_ignore([
### START OF CODE GENERATED BY Argbash v2.5.0 one line above ###
### START OF CODE GENERATED BY Argbash v2.5.1 one line above ###
# Argbash is a bash code generator used to get arguments parsing right.
# Argbash is FREE SOFTWARE, see https://argbash.io for more info

Expand Down Expand Up @@ -102,7 +102,7 @@ parse_commandline ()
handle_passed_args_count ()
{
_required_args_string="'directory'"
test ${#_positionals[@]} -lt 1 && _PRINT_HELP=yes die "FATAL ERROR: Not enough positional arguments - we require at least 1 (namely: $_required_args_string), but got only ${#_positionals[@]}." 1
test ${#_positionals[@]} -ge 1 || _PRINT_HELP=yes die "FATAL ERROR: Not enough positional arguments - we require at least 1 (namely: $_required_args_string), but got only ${#_positionals[@]}." 1
}

assign_positional_args ()
Expand Down
2 changes: 1 addition & 1 deletion resources/examples/simple.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# INCLUDE_PARSING_CODE([simple-parsing.sh])
# ARGBASH_GO()
# needed because of Argbash --> m4_ignore([
### START OF CODE GENERATED BY Argbash v2.5.0 one line above ###
### START OF CODE GENERATED BY Argbash v2.5.1 one line above ###
# Argbash is a bash code generator used to get arguments parsing right.
# Argbash is FREE SOFTWARE, see https://argbash.io for more info

Expand Down
2 changes: 1 addition & 1 deletion src/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.0
2.5.1

0 comments on commit c607930

Please sign in to comment.