159e378cbb
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
14 lines
510 B
Bash
14 lines
510 B
Bash
# shellcheck shell=bash
|
|
|
|
nodejsInstallManuals() {
|
|
local -r packageJson="${1-./package.json}"
|
|
|
|
local -r packageOut="$out/lib/node_modules/$(@jq@ --raw-output '.name' package.json)"
|
|
|
|
while IFS= read -r man; do
|
|
installManPage "$packageOut/$man"
|
|
done < <(@jq@ --raw-output '(.man | type) as $typ | if $typ == "string" then .man
|
|
elif $typ == "list" then .man | join("\n")
|
|
elif $typ == "null" then empty
|
|
else "invalid type " + $typ | halt_error end' "$packageJson")
|
|
}
|