mirror of
https://github.com/siderolabs/talos.git
synced 2025-08-07 07:07:10 +02:00
53 lines
1.3 KiB
Bash
53 lines
1.3 KiB
Bash
#!/bin/bash
|
|
|
|
function remove_symlinks() {
|
|
set +e
|
|
for l in $(find ${PREFIX} -type l); do
|
|
readlink $l | grep -q /toolchain
|
|
if [ $? == 0 ]; then
|
|
echo "Unlinking $l"
|
|
unlink $l
|
|
fi
|
|
done
|
|
set -e
|
|
}
|
|
|
|
PREFIX="${1}"
|
|
|
|
remove_symlinks
|
|
find ${PREFIX} -type f -name \*.a -print0 | xargs -0 rm -rf
|
|
find ${PREFIX}/lib ${PREFIX}/usr/lib -type f \( -name \*.so* -a ! -name \*dbg \) -exec strip --strip-unneeded {} ';'
|
|
find ${PREFIX}/{bin,sbin} ${PREFIX}/usr/{bin,sbin,libexec} -type f -exec strip --strip-all {} ';'
|
|
|
|
rm -rf \
|
|
${PREFIX}/bin/getconf \
|
|
${PREFIX}/bin/ldd \
|
|
${PREFIX}/bin/mtrace \
|
|
${PREFIX}/bin/gencat \
|
|
${PREFIX}/bin/locale \
|
|
${PREFIX}/bin/xtrace \
|
|
${PREFIX}/bin/zic \
|
|
${PREFIX}/bin/sln \
|
|
${PREFIX}/bin/tzselect \
|
|
${PREFIX}/bin/iconv \
|
|
${PREFIX}/bin/sotruss \
|
|
${PREFIX}/bin/ldconfig \
|
|
${PREFIX}/bin/pldd \
|
|
${PREFIX}/bin/iconvconfig \
|
|
${PREFIX}/bin/localedef \
|
|
${PREFIX}/bin/makedb \
|
|
${PREFIX}/bin/pcprofiledump \
|
|
${PREFIX}/bin/nscd \
|
|
${PREFIX}/bin/sprof \
|
|
${PREFIX}/bin/zdump \
|
|
${PREFIX}/bin/getent \
|
|
${PREFIX}/bin/scmp_sys_resolver \
|
|
${PREFIX}/bin/catchsegv \
|
|
${PREFIX}/lib/gconv/ \
|
|
${PREFIX}/include/* \
|
|
${PREFIX}/share/* \
|
|
${PREFIX}/usr/include/* \
|
|
${PREFIX}/usr/share/* \
|
|
${PREFIX}/usr/libexec/getconf \
|
|
${PREFIX}/var/db
|