On Wed, May 26, 2010 at 08:02:45PM +0200, Jaromír Mikeš wrote:

FS > More. The unpatch should be done only if within a git repository.
FS > Something like:

FS > override_dh_auto_clean:
FS >   if [ -d .git ] ; then \
FS >     quilt pop -a \
FS >   fi
FS >   dh_auto_clean

I am trying use your script above, but getting this error:

$ git-buildpackage -S --git-ignore-new
dh --with quilt clean
  debian/rules override_dh_auto_clean
make[1]: Entering directory `/home/mira/zita-convolver2'
if [ -d .git ] ; then \
                quilt pop -a \
/bin/sh: Syntax error: end of file unexpected (expecting "fi")

Some syntax problem? I tried fix it by myself, but I am not good in scripting.
rules file is in attachment if you are interested.

You miss a semicolon.

This is shell:

if [ -d .git ]; then
        quilt pop -a

...and this is the same, expressed in one line ("fi" is a separate command, so a semicolon before that is required):

if [ -d .git ]; then quilt pop -a; fi

...and here is the shell code, virtually on one line, but folded by make:

        if [ -d .git ]; then \
                quilt pop -a; \

...make is ignorant about the actual shell code - this works too (only additional leading space will be passed on to the shell):

        if [ -\
        d .git ]; the\
        n quilt pop -\
        a; fi

Hope that helps. If not, then the sort version is to add a semicolon before "if". :-)

 - Jonas

 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

Attachment: signature.asc
Description: Digital signature

pkg-multimedia-maintainers mailing list

Reply via email to