Merge pull request #249932 from delroth/buildnpmpackage-manpage

buildNpmPackage: symlink manpages to the correct output directory
This commit is contained in:
Robert Schütz 2023-08-19 03:31:01 +00:00 committed by GitHub
commit 3ebab3e29b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,6 +24,13 @@ npmInstallHook() {
elif $typ == "object" then .bin | to_entries | map(.key + " " + .value) | join("\n")
else "invalid type " + $typ | halt_error end' "${npmWorkspace-.}/package.json")
while IFS= read -r man; do
mkdir -p "$out/share/man"
ln -s "$packageOut/$man" "$out/share/man"
done < <(@jq@ --raw-output '(.man | type) as $typ | if $typ == "string" then .man
elif $typ == "list" then .man | join("\n")
else "invalid type " + $typ | halt_error end' "${npmWorkspace-.}/package.json")
local -r nodeModulesPath="$packageOut/node_modules"
if [ ! -d "$nodeModulesPath" ]; then