Re: pbuilder and building a package twice in a row with hook-skript?
Salvatore Bonaccorso <salvatore.bonaccorso@gmail.com> writes:
> Then using --hookdir of pbuilder to pass the directory where these
> hookscripts are stored. Basically I will do in a B-hook-script the
> following, but is not yet "perfect" :(
>
> cd /tmp/buildd
> PKGNAMES=$(ls -d */)
> for PKG in $PKGNAMES; do
> if [ -d $PKG ]; then
> cd $PKG
> dpkg-buildpackage -tc
> fi
> done
I'm not sure why you get the names that are directories (‘ls -d */’),
but then also test each one to see if it's a directory.
Also, if the only use for the initial ‘cd’ is to get names of other
directories to ‘cd’ into, then just list those names in the first
place.
$ cat $HOME/.pbuilder/hooks/B10_build-again
#! /bin/sh
# Build the package again to test for error on double build
echo "I: building the package again"
for dir in $(ls -d /tmp/buildd/*/) ; do
cd ${dir}
dpkg-buildpackage -tc
done
--
\ “Speech is conveniently located midway between thought and |
`\ action, where it often substitutes for both.” —John Andrew |
_o__) Holmes, _Wisdom in Small Doses_ |
Ben Finney
Reply to: