Repository navigation
Releases: BetterScripts/shtoolkit
Releases · BetterScripts/shtoolkit
Release list
v26.1
Major Update
BREAKING CHANGES! (See below.)
More complete list of changes available in CHANGES.MD.
NEW
- Name: BetterScripts
shtoolkit. - Libraries:
libmap.sh- emulated associative arrays for any shell.libpath.sh- commands to assist with path processing, including path information like size, owner, etc and a portablemktempalternative.libstring.sh- commands assist with string processing.
- Simple debugging support across all libraries.
CHANGES & FIXES
- BREAKING CHANGE Significantly reworked
libarray.shwhich is now more robust, and more consistent. - General improvements across all libraries.
- Test harness updates and changes for correctness, robustness, and portability.
LIBARRAY
Changes required result in differences verses previous library versions - some previously supported usage is no longer works:
- Pattern matching has been completely rewritten - it is now more portable, robust, and the same options are available everywhere. Some previously working matches will no longer match. Affects
array_remove,array_search,array_contains, andarray_split. - Command options now MUST precede any non-option arguments. Affects
array_from_path. array_printfno longer writes anything for empty arrays (previously a single<newline>would be written).
v2024-08-14 Latest
Release v2024-08-14 for 14th August 2024, includes:
libarray.sh - v1.2.0
libdeque.sh - v1.1.0
libgetargs.sh & getarg - v1.3.0
Release is focused on portablity updates and makes many changes across all libraries and many tests.
libarray.sh v1.2.0
- [NEW] Added
array_is_array. - [NEW]
array_splitnow has multiple ways of splitting text. - [FIX] (PORTABILITY) Added trailing '\n' to
printf- without it some implementations will effectively discard the last line of data. - [FIX] (PORTABILITY) Rewrote
awkscripts to better match platform capabilities. (Allawkusage has changed considerably.) - [FIX] (PORTABILITY) Added workarounds for
sedwhere '\n' in a replacement expression does not result in a<newline>. - [FIX] (PORTABILITY) Changed
sedscripts to avoid long label names and remove grouping with{when not required. - [FIX] (PORTABILITY) Minor changes to some
casestatements which should now be more portable, though never showed any issues (e.g. add;;to some statements where it was missing even though this was permitted.) - [FIX] (PORTABILITY) Use null string instead of no arguments for
echowhen intent is only to output a<newline>. - [FIX] (PORTABILITY) Minor changes to parameter expansion to avoid issues with ksh88.
libgetargs.sh & getarg v1.3.0
- [FIX] Fixed an issue that would cause a failure under
set -uwhen an unset user variable was used. (Although the failure may be useful, it breaks the principle that behavior is the same underset -uandset +u.) - [FIX] (PORTABILITY) Added trailing '\n' to
printf- without it some implementations will effectively discard the last line of data. - [FIX] (PORTABILITY) Rewrote OPTION matching to be simpler and more portable:
sedis now used in place ofexprandgrepfor all matching;tris required where previously use was based on config. (NOTES: Previously rejected OPTION-CONFIG may now be accepted; performance characteristics may have changed, however overall performance was not measurably altered.) - [FIX] (PORTABILITY) Minor changes to some
casestatements which should now be more portable, though never showed any issues (e.g. add;;to some statements where it was missing even though this was permitted.)
libdeque.sh v1.1.0
- [FIX] (PORTABILITY) Added workarounds for
grepwhere '-F' is not available. (Assumesfgrepis available in this case - this may change.) - [FIX] (PORTABILITY) Removed
-when used to indicate input is fromSTDIN. - [FIX] (PORTABILITY) Minor changes to parameter expansion to avoid issues with ksh88 and posh.
Other
- [FIX] Makefile doc generation (typo caused incorrect behavior outside GNU tools).
- [FIX] (PORTABILITY) Fixes to test harness and tests for portablity.
- [NEW] Added support for more auto-detected shells in test harness.
- [CHANGE] Documentation updates & edits.
Full Changelog: v2024-06-29...v2024-08-14
v2024-06-29
Release v2024-06-29 for 29th June 2024, includes:
libarray.sh- v1.0.1libdeque.sh- v1.0.0libgetargs.sh&getarg- v1.2.0