slkbuild zero length files
Posted: 25. Dec 2010, 21:42
I know there is a function in the slkbuild script to remove zero length files from $startdir/pkg/usr/doc/$pkgname-$pkgver but I'm still receiving warnings from makepkg regarding such files.
Just a thought, couldn't this...
...be shortened to something like this:
Just a thought, couldn't this...
Code: Select all
# if the docs weren't deleted ...
if [ -d "$startdir/pkg/usr/doc/$pkgname-$pkgver" ]; then
cd $startdir/pkg/usr/doc/$pkgname-$pkgver
#remove zero lenght files
if [[ $(find . -type f -size 0) ]]; then
echo "Removing some zero lenght files"
find . -type f -size 0 -exec rm -f {} \;
fi
fi
Code: Select all
# if the docs weren't deleted ...
if [ -d "$startdir/pkg/usr/doc/$pkgname-$pkgver" ]; then
# remove zero length files
find $startdir/pkg/usr/doc/$pkgname-$pkgver -type f -size 0c -exec rm -f {} \;
fi