python311Packages.moto: 4.2.6 -> 4.2.10
[NixPkgs.git] / pkgs / build-support / setup-hooks / move-sbin.sh
blob1c0c4dc9f2d98caa0588e7f4056d39dd52ac3761
1 # This setup hook, for each output, moves everything in $output/sbin
2 # to $output/bin, and replaces $output/sbin with a symlink to
3 # $output/bin.
5 fixupOutputHooks+=(_moveSbin)
7 _moveSbin() {
8 if [ "${dontMoveSbin-}" = 1 ]; then return; fi
9 if [ ! -e "$prefix/sbin" -o -L "$prefix/sbin" ]; then return; fi
10 echo "moving $prefix/sbin/* to $prefix/bin"
11 mkdir -p $prefix/bin
12 shopt -s dotglob
13 for i in $prefix/sbin/*; do
14 mv "$i" $prefix/bin
15 done
16 shopt -u dotglob
17 rmdir $prefix/sbin
18 ln -s bin $prefix/sbin