diff options
author | EuAndreh <eu@euandre.org> | 2025-05-09 08:43:21 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2025-05-09 08:43:21 -0300 |
commit | 257b73065cc1dffd3bea567b69454409c67eca47 (patch) | |
tree | 2aa87b854ea20fb8d5e3645e62f7b3ffbc0b8c0e | |
parent | src/urlid: Add working version, based on uuid(1) and xxxd(1) (diff) | |
download | eut-257b73065cc1dffd3bea567b69454409c67eca47.tar.gz eut-257b73065cc1dffd3bea567b69454409c67eca47.tar.xz |
src/mandir: Accept more things as "section" of manpage
-rwxr-xr-x | src/mandir | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -19,7 +19,7 @@ shift ldirnames() { find "$@" | xargs -I% basename % | - sed 's|^\(.*\)\.\([a-z][a-z]\)\.\([0-9]\)$|\2/man\3|' + sed 's|^\(.*\)\.\([a-z][a-z]\)\.\(.*\)$|\2/man\3|' } dirnames() { @@ -32,8 +32,8 @@ if [ "$ACTION" = 'install' ]; then fi for f in "$@"; do - lang="$( printf '%s\n' "$f" | awk -F. '$0=$(NF - 1)')" - section="$(printf '%s\n' "$f" | awk -F. '$0=$(NF)')" + lang="$( printf '%s\n' "$f" | cut -d. -f2)" + section="$(printf '%s\n' "$f" | cut -d. -f3-)" name="$(basename "${f%."$lang"."$section"}")" nameext="$name.$section" case "$ACTION" in |