1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 13:41:26 +00:00
nixpkgs/pkgs/build-support/setup-hooks/move-docs.sh

24 lines
625 B
Bash
Raw Normal View History

# 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.
2014-08-25 14:30:46 +01:00
preFixupHooks+=(_moveToShare)
_moveToShare() {
forceShare=${forceShare:=man doc info}
if [[ -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
}