On Tue, 2011-02-15 at 17:28 -0600, David C. Rankin wrote:
Guys,
I want a quick and dirty want to get the svn revision of a local svn module. What I'm currently doing is:
#!/bin/bash getsvnrev() { msg "Determining SVN revision for $pkgname..." [[ -d .svn ]] && echo $(sed -n '4p' .svn/entries) || echo 9999 }
pkgver=$(getsvnrev)
It works fine, but is there a standard way (no not svnversion) to read the local version other than the backwards way I'm doing it?
-- David C. Rankin, J.D.,P.E.
I have been using this: svn info | grep "Last Changed Rev:" | cut -d' ' -f 4 Works for me. But I never have liked the grep of a string as I guess it could change based on a locale setting. Nonetheless, it works for me. Yours sincerely, Roger Oberholtzer OPQ Systems / Ramböll RST Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 roger.oberholtzer@ramboll.se ________________________________________ Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden www.rambollrst.se -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org