logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git
commit: 7158c253cca74d5a50df755eaeb7ca6cfca36602
parent 21f2f9af3b7ffac17dee0e4fa62eeee0595522c8
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Mon, 30 Oct 2023 05:38:00 +0100

nodejs.eclass: Handle package.json#man entry

Diffstat:

Meclass/nodejs.eclass15+++++++++++++++
1 file changed, 15 insertions(+), 0 deletions(-)

diff --git a/eclass/nodejs.eclass b/eclass/nodejs.eclass @@ -158,4 +158,19 @@ nodejs_src_install() { die "Unhandled package.json#bin type: ${bin_type}" ;; esac + + man_type="$(jq -r '.man | type' <package.json)" + case "${man_type}" in + null) + ;; + string) + doman "$(jq -r '.man' <package.json)" + ;; + array) + jq -r '.man[]' <package.json \ + | while read file; do + doman "$file" + done + ;; + esac }