2010-05-26 17:38:52 -04:00
|
|
|
$OpenBSD: patch-version_sh,v 1.4 2010/05/26 21:38:52 jakemsr Exp $
|
|
|
|
--- version.sh.orig Tue May 11 19:21:00 2010
|
|
|
|
+++ version.sh Wed May 12 19:55:32 2010
|
|
|
|
@@ -1,14 +1,19 @@
|
2007-05-25 11:54:14 -04:00
|
|
|
#!/bin/sh
|
|
|
|
|
2008-01-25 20:56:02 -05:00
|
|
|
# check for SVN revision number
|
2010-05-26 17:38:52 -04:00
|
|
|
-revision=$(cd "$1" && cat snapshot_version 2> /dev/null)
|
|
|
|
-test $revision || revision=$(cd "$1" && LC_ALL=C svn info 2> /dev/null | grep "Last Changed Rev" | cut -d' ' -f4)
|
|
|
|
-test $revision || revision=$(cd "$1" && grep committed-rev .svn/entries 2>/dev/null | head -n 1 | cut -d '"' -f2)
|
|
|
|
-test $revision || revision=$(cd "$1" && sed -n -e '/^dir$/{n
|
|
|
|
-p
|
|
|
|
-q
|
|
|
|
-}' .svn/entries 2>/dev/null)
|
|
|
|
+#revision=$(cd "$1" && cat snapshot_version 2> /dev/null)
|
|
|
|
+#test $revision || revision=$(cd "$1" && LC_ALL=C svn info 2> /dev/null | grep "Last Changed Rev" | cut -d' ' -f4)
|
|
|
|
+#test $revision || revision=$(cd "$1" && grep committed-rev .svn/entries 2>/dev/null | head -n 1 | cut -d '"' -f2)
|
|
|
|
+#test $revision || revision=$(cd "$1" && sed -n -e '/^dir$/{n
|
|
|
|
+#p
|
|
|
|
+#q
|
|
|
|
+#}' .svn/entries 2>/dev/null)
|
2008-01-25 20:56:02 -05:00
|
|
|
+#test $revision && revision=SVN-r$revision
|
|
|
|
+
|
|
|
|
+revision=`cd "$1" && grep Revision svn-info | \
|
2007-05-25 11:54:14 -04:00
|
|
|
+ cut -d' ' -f2 2> /dev/null`
|
2008-01-25 20:56:02 -05:00
|
|
|
test $revision && revision=SVN-r$revision
|
|
|
|
+test $revision || revision=UNKNOWN
|
2007-05-25 11:54:14 -04:00
|
|
|
|
2010-05-26 17:38:52 -04:00
|
|
|
# check for git svn revision number
|
2008-01-25 20:56:02 -05:00
|
|
|
if ! test $revision; then
|