slkbuild zero length files

You think you have found a bug? Let us know about it.
Post Reply
User avatar
pwatk
Posts: 474
Joined: 14. Mar 2010, 23:56
Location: United Kingdom

slkbuild zero length files

Post by pwatk »

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...

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
...be shortened to something like this:

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
Image
Post Reply