lfs-rpmbootstrap/remove_duplicates.sh

26 lines
464 B
Bash
Raw Normal View History

2024-10-20 11:12:29 +08:00
#!/bin/bash
if [ "`whoami`" != "root" ]; then
echo "You must run this as r00t. Sorry."
exit 1
fi
pushd /usr/share/man
for file in `find . -type f -print`; do
if [ -f "${file}.gz" ]; then
echo "removing ${file} as duplicate"
rm -f ${file}
sleep 0.3
fi
done
popd
pushd /usr/share/info
for file in `find . -type f -print`; do
if [ -f "${file}.gz" ]; then
echo "removing ${file} as duplicate"
rm -f ${file}
sleep 0.3
fi
done
popd