diff options
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/build-support/setup-hooks/move-docs.sh')
-rw-r--r-- | infra/libkookie/nixpkgs/pkgs/build-support/setup-hooks/move-docs.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/build-support/setup-hooks/move-docs.sh b/infra/libkookie/nixpkgs/pkgs/build-support/setup-hooks/move-docs.sh new file mode 100644 index 000000000000..ef31dcdce274 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/build-support/setup-hooks/move-docs.sh @@ -0,0 +1,23 @@ +# This setup hook moves $out/{man,doc,info} to $out/share; moves +# $out/share/man to $man/share/man; and moves $out/share/doc to +# $man/share/doc. + +preFixupHooks+=(_moveToShare) + +_moveToShare() { + forceShare=${forceShare:=man doc info} + if [ -z "$forceShare" -o -z "$out" ]; then return; fi + + for d in $forceShare; do + if [ -d "$out/$d" ]; then + if [ -d "$out/share/$d" ]; then + echo "both $d/ and share/$d/ exist!" + else + echo "moving $out/$d to $out/share/$d" + mkdir -p $out/share + mv $out/$d $out/share/ + fi + fi + done +} + |