2014-10-07 14:43:56 +02:00
|
|
|
# This setup hook, for each output, moves everything in $output/sbin
|
|
|
|
# to $output/bin, and replaces $output/sbin with a symlink to
|
|
|
|
# $output/bin.
|
|
|
|
|
|
|
|
fixupOutputHooks+=(_moveSbin)
|
|
|
|
|
|
|
|
_moveSbin() {
|
2019-10-30 00:42:31 +01:00
|
|
|
if [ "${dontMoveSbin-}" = 1 ]; then return; fi
|
2014-10-07 15:04:13 +02:00
|
|
|
if [ ! -e "$prefix/sbin" -o -L "$prefix/sbin" ]; then return; fi
|
2014-10-07 14:43:56 +02:00
|
|
|
echo "moving $prefix/sbin/* to $prefix/bin"
|
|
|
|
mkdir -p $prefix/bin
|
|
|
|
shopt -s dotglob
|
|
|
|
for i in $prefix/sbin/*; do
|
|
|
|
mv "$i" $prefix/bin
|
|
|
|
done
|
|
|
|
shopt -u dotglob
|
|
|
|
rmdir $prefix/sbin
|
|
|
|
ln -s bin $prefix/sbin
|
|
|
|
}
|