From: <ssk...@vh...> - 2005-09-12 12:30:54
|
Author: sskracic Date: 2005-09-12 14:21:39 +0200 (Mon, 12 Sep 2005) New Revision: 767 Modified: tools/trunk/misc/build-all.sh Log: More elegant way to find out the revision no. of the current dir. Modified: tools/trunk/misc/build-all.sh =================================================================== --- tools/trunk/misc/build-all.sh 2005-09-12 09:25:57 UTC (rev 766) +++ tools/trunk/misc/build-all.sh 2005-09-12 12:21:39 UTC (rev 767) @@ -185,21 +185,14 @@ # Gets svn revision for app whose tree starts in current dir. function get_svn_revision { SVN_REVISION="" - ccm_app=$(pwd) - ccm_app=${ccm_app##*/} - direntry=$(expr match "$(tr '\012' ' ' < .svn/entries)" '.*\(<entry [^>]*name=""[^>]*>\)') - if [ -z "$direntry" ]; then - echo "Could not find top level .svn entry for $ccm_app" - exit 1 - fi - revision=$(expr match "$direntry" '.*revision="\([0-9]*\)"') + revision=$(svn info . | grep ^Revision | cut '-d ' -f2) + ccm_app=$(pwd | sed 's!.*/!!') if [ -z "$revision" ]; then echo "Could not find the most recent svn revision number for $ccm_app" exit 1 fi # Woo hoo, we have revision number now! echo "Found the svn revision number for $ccm_app: $revision" - SVN_REVISION=".r$revision" } |