]> granicus.if.org Git - sudo/commitdiff
Fix expr usage w/ GNU expr
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 7 Mar 2011 15:08:21 +0000 (10:08 -0500)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 7 Mar 2011 15:08:21 +0000 (10:08 -0500)
sudo.pp

diff --git a/sudo.pp b/sudo.pp
index 935210e34e5ff33c775d207fb8d3651c04b466a3..c8e771d6758a611c524920ac58982b6ca2c9e9d4 100644 (file)
--- a/sudo.pp
+++ b/sudo.pp
@@ -39,7 +39,7 @@ still allow people to get their work done."
 
 %if [rpm,deb]
        # Convert patch level into release and remove from version
-       pp_rpm_release="`expr $version : '.*p\([0-9][0-9]*\)' + 1`"
+       pp_rpm_release="`expr \( $version : '.*p\([0-9][0-9]*\)' \| 0 \) + 1`"
        pp_rpm_version="`expr $version : '\(.*\)p[0-9][0-9]*'`"
        pp_rpm_license="BSD"
        pp_rpm_url="http://www.sudo.ws/"