2014-07-08 15:33:15 +02:00
|
|
|
# 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-07-08 14:26:35 +02:00
|
|
|
|
2014-08-25 15:30:46 +02:00
|
|
|
preFixupHooks+=(_moveToShare)
|
2014-07-08 14:26:35 +02:00
|
|
|
|
2014-07-08 15:33:15 +02:00
|
|
|
_moveToShare() {
|
2014-07-08 14:26:35 +02:00
|
|
|
forceShare=${forceShare:=man doc info}
|
2014-07-08 15:33:15 +02:00
|
|
|
if [ -z "$forceShare" -o -z "$out" ]; then return; fi
|
2014-07-08 14:26:35 +02:00
|
|
|
|
|
|
|
for d in $forceShare; do
|
2014-07-08 15:33:15 +02:00
|
|
|
if [ -d "$out/$d" ]; then
|
|
|
|
if [ -d "$out/share/$d" ]; then
|
2014-07-08 14:26:35 +02:00
|
|
|
echo "both $d/ and share/$d/ exist!"
|
|
|
|
else
|
2014-07-08 15:33:15 +02:00
|
|
|
echo "moving $out/$d to $out/share/$d"
|
|
|
|
mkdir -p $out/share
|
|
|
|
mv $out/$d $out/share/
|
2014-07-08 14:26:35 +02:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
}
|
2014-07-08 15:33:15 +02:00
|
|
|
|