void-packages/srcpkgs/klibc/files/initramfs-tools-hooks
classabbyamp 9ab1405894
*: remove unnecessary execute permissions
* INSTALL scripts don't need to be executable
* anything installed by vbin is set to 755
* many of these files were otherwise marked executable in the template
  (vinstall, chmod, etc)
* some had no business being executable, like the smattering of patches
  and other files
* remove files from chroot-distcc no longer used in the template
  (46ce787b63d467d9b8e5ef8821e2ddefea4b980a)
2024-08-02 13:24:47 -04:00

35 lines
579 B
Bash

#!/bin/sh
prereqs()
{
if [ "${BUSYBOX}" = "n" ] || [ ! -f "${BUSYBOX_EXECUTABLE}" ]; then
echo ''
else
# Ensure busybox installs all its commands before
# checking what we should provide
echo zz-busybox
fi
}
case $1 in
prereqs)
prereqs
exit 0
;;
esac
for src in /usr/lib/klibc/bin/*; do
command="${src##*/}"
case "$src" in
gzip | kinit | zcat)
;;
*)
# Don't install commands that already exist in /bin or /sbin
if ! [ -e "${DESTDIR}/sbin/$command" ]; then
cp -pnL "$src" "${DESTDIR}/bin"
fi
;;
esac
done
cp -pL /lib/klibc-*.so "${DESTDIR}/lib"