Skip to content

Releases: vlisivka/bash-modules

Version 4.0.1

11 Feb 17:53
Compare
Choose a tag to compare

Few fixes since beta1

21 Jul 13:41
Compare
Choose a tag to compare

Some bug fixes and few improvements since beta1:

  • compatibility script for basher (to use bash-modules without installation) is added.
  • is_function and dispatch functions are added to meta module.
  • support for configuration file in user directory is added, and few other improvements.

New major version of bash-modules

04 Jul 15:48
Compare
Choose a tag to compare
  • Backward compatibility is broken.
  • Few new functions are added.
  • More examples
  • More documentation.
  • Unit test cases are updated and test cases for import.sh and install.sh are added.
  • Unnecessary code is removed.

Feedback is welcome.

Bugfixes

04 May 12:51
Compare
Choose a tag to compare

Bug with "Required" option is fixed. Bug with handling of user specific configuration files is fixed.

Support for required options and options with additonal checks is added.

11 Apr 22:04
Compare
Choose a tag to compare

Now option types can be one letter (S, B, I, A, N), short (Str, Bool, Incr, Num), or full (String, Boolean, Incremental, Number), for better code reader experience.

Options can be marked as required (R, Req, Required):

 parse_arguments  '-f|--foo)FOO;String,Required'  '-b|--bar)BAR;S,R' -- "$@" || exit $?

Additional checks can be added to options. Checks are executed after argument parsing cycle. Example:

'-f)FOO;Number,Required, (( FOO > 2 ))'  \
'-b)BAR;Number, (( BAR > FOO*2 ))'  \
'-B)BAZ;String,Required, [[ "$BAZ" =~ foo* ]]' \
...

Dependency on perl is removed

08 Apr 00:36
Compare
Choose a tag to compare
  • Small cosmetic fixes.
  • function END is added again for better looking code
  • dependency on perl is removed from spec file, so containers will be smaller but help text will look ugly.

Fix for "uninitialized variable" problem on Fedora 21

15 Dec 12:05
Compare
Choose a tag to compare

bash-4.3.30 started to throw errors when script tries to get length of empty array in "unused_vars" (set -u) mode, so here is the fix.