3 Commits
v0.1 ... v0.2

Author SHA1 Message Date
a9d0eeef5a Added chapter todo 2022-03-22 14:31:32 +01:00
5c367b357a Initial changelogs 2022-03-22 14:27:10 +01:00
d20ef76316 Fix pattern substituion (found with bash3.2.57) 2022-03-22 14:11:45 +01:00
3 changed files with 27 additions and 4 deletions

23
CHANGELOG.md Normal file
View File

@@ -0,0 +1,23 @@
# Changelog
## Todo
- [ ] Tests on different platforms (e.g. busybox)
## [0.2](https://winklerfamilie.eu/git/efelon/rdlink/releases/tag/v0.2) - 2022-03-22
* Fix pattern substitution bugs (found with bash 3.2.57)
* Test successful on
* Ubuntu x86_64 (Ubuntu 20.04.4 LTS)
**GNU bash, version 3.2.57**
## [0.1](https://winklerfamilie.eu/git/efelon/rdlink/releases/tag/v0.1) - 2022-03-22
* First relase
* behavior for normal cases same as readlink -f
* Tests successful on
* Raspberry Pi OS aarch64/arm64 (Debian GNU/Linux 11 (bullseye))
**GNU bash, version 5.1.4**
* Ubuntu x86_64 (Ubuntu 20.04.4 LTS)
**GNU bash, Version 5.0.17**

View File

@@ -169,7 +169,7 @@ rl::cleanpath() {
# Remove multiple / # Remove multiple /
while [[ "${work:-}" = *"//"* ]]; do while [[ "${work:-}" = *"//"* ]]; do
work="${work//'//'/'/'}" work="${work/\/\///}"
done done
info " rl::cleanpath result: ${work}" info " rl::cleanpath result: ${work}"
@@ -191,7 +191,7 @@ rl::normalize() {
# Remove /./ and /.$ sequences. # Remove /./ and /.$ sequences.
rex_tmp='/\.(/|$)' rex_tmp='/\.(/|$)'
while [[ "$work" =~ $rex_tmp ]]; do while [[ "$work" =~ $rex_tmp ]]; do
work="${work/"${BASH_REMATCH[0]}"/"${BASH_REMATCH[1]/$//}"}" work="${work/${BASH_REMATCH[0]}/${BASH_REMATCH[1]/$//}}"
done done
# Remove leading ./ # Remove leading ./

View File

@@ -47,7 +47,7 @@ rl::printPath() {
local inputwidth=${config_path_width} local inputwidth=${config_path_width}
if (( flag_extendedOutput )); then if (( flag_extendedOutput )); then
printf -- "%-3d Inp: %-${config_path_width}s ---" ${testnum} "${input}" printf -- "%-5d Inp: %-${config_path_width}s ---" ${testnum} "${input}"
else else
# Truncate input string on the left if longer than $config_path_width # Truncate input string on the left if longer than $config_path_width
if (( ${#input} > ${config_path_width} )) ; then if (( ${#input} > ${config_path_width} )) ; then