Introduce build script which extracts script logic and removes debug output

This commit is contained in:
2022-03-22 10:53:23 +01:00
parent 571791fd5c
commit 24cd62e720
3 changed files with 89 additions and 4 deletions

View File

@@ -49,8 +49,7 @@ rl::rdlink() {
# Follow multiple symlinks
while subject="$(rl::quicklink "${subject}")" ; do
# A link was resolved at least once
:
: # A link was resolved at least once
info " rl::rdlink - Link found: $subject"
done
@@ -129,6 +128,7 @@ rl::canon() {
subject="${work}${bname:+"/${bname}"}"
info " rl::canon valid parent: ${subject}"
# Special: Succeed with valid element after second run; see special below
# e.g. /root/.
# * /root is valid but not accessible
@@ -165,8 +165,8 @@ rl::cleanpath() {
local rex_tmp=
info "Cleaning path... ${1:-}"
work="${1:-}"
# Remove multiple /
while [[ "${work:-}" = *"//"* ]]; do
work="${work//'//'/'/'}"
@@ -180,8 +180,8 @@ rl::normalize() {
local work=
info "Normalizing path... ${1:-}"
work="${1:-}"
# Remove dir/.. sequences.
local rex_tmp='[^/][^/]*/\.\./*'
while [[ "${work}" =~ $rex_tmp ]] ; do