On Sun, Apr 10, 2005 at 04:01:12PM +0200, Robert Millan wrote:
>I'm attaching an update of Andreas' patch.  Diffed against today's tla
>snapshot.

>+signdeb () {
>+      if [ -x $(which dpkg-sig) ]; then
>+              dpkg-sig -k "${signkey:-$maintainer}" --sign=builder "../$1";
>+      fi
>+}

This -x test doesn't actually work:

  bash$ if [ -x $(which non-existent-program) ]; then echo found; fi
  found

The $() evaluates to empty, making the test [ -x ].  Since -x is only
interpreted as a file test when followed by an argument, this evaluates
to true (as would [ foo ]).

Given that dpkg-buildpackage uses "command -v" elsewhere for program
tests, I'd suggest:

    if command -v dpkg-sig >/dev/null 2>&1; then
        dpkg-sig ...
    fi

--bod


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to