summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChantry Xavier <shiningxc@gmail.com>2008-01-27 00:24:36 +0100
committerDan McGee <dan@archlinux.org>2008-01-27 11:49:24 -0600
commitf950c2630798e03bbee314c4a3f2749d1293a2b3 (patch)
treef533d299970f6e220c36295463f52e606565411e
parent11692e0eef79e016859bb182917e56a12a14f734 (diff)
downloadpacman-f950c2630798e03bbee314c4a3f2749d1293a2b3.tar.xz
makepkg : improve determination of svn revision.
The previous sed command matched every line starting with r. For example, with mpd-svn package in aur, the svn log output was rather big, and there were several lines starting with r (the actual revision : r7155, but also other lines starting with reverting and run), so this broke makepkg: > makepkg ==> Determining latest svn revision... -> Version found: 7155 everting un sed: -e expression #1, char 27: unterminated `s' command To make the sed command more bullet proof, I added the -q option of svn log, which produces a quieter output, without the log. And I changed the sed command to only match numbers for the revision. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--scripts/makepkg.sh.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 998e240c..f5d5e052 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1007,7 +1007,7 @@ devel_check() {
newpkgver=$(date +%Y%m%d)
elif [ ! -z ${_svntrunk} ] && [ ! -z ${_svnmod} ] ; then
msg "$(gettext "Determining latest svn revision...")"
- newpkgver=$(svn log $_svntrunk --limit 1 | sed -n 's/^r\([^ ]*\) .*$/\1/p')
+ newpkgver=$(svn log $_svntrunk --limit 1 -q | sed -n 's/^r\([0-9]*\) .*$/\1/p')
elif [ ! -z ${_bzrtrunk} ] && [ ! -z ${_bzrmod} ] ; then
msg "$(gettext "Determining latest bzr revision...")"
newpkgver=$(bzr revno ${_bzrtrunk})