source: branches/alma/getsvnrev.sh@ 1447

Last change on this file since 1447 was 1447, checked in by TakTsutsumi, 16 years ago

Added a shell script to get svn revision info.

  • Property svn:executable set to *
File size: 902 bytes
Line 
1#! /bin/bash
2
3# Store info about which svn branch, what revision and at what date/time
4# we executed make.
5
6# if we don't see the .svn directory, just return
7if test ! -d .svn; then
8 exit 0;
9fi
10
11
12OUT=python/svninfo.txt
13
14INFOTOP=`svn info | awk '/Last Changed Rev:/ { print $4} /URL:/ { print $2 }'`
15SRCVER=`svn info src/.svn | awk '/Last Changed Rev:/ { print $4}'`
16PYVER=`svn info python/.svn | awk '/Last Changed Rev:/ { print $4}'`
17
18HTTPS="https://svn.cv.nrao.edu/svn/casa"
19for i in $INFOTOP; do
20 echo $i
21 if test ${i:0:4} = "http"; then
22 if test ${i:0:5} = "https"; then
23 echo ${i#${HTTPS}} > $OUT
24 fi
25 else
26 if test $SRCVER -gt $i; then
27 echo $SRCVER >> $OUT
28 elif test $PYVER -gt $i; then
29 echo $PYVER >> $OUT
30 else
31 #echo $i | tee -a $OUT
32 echo $i >> $OUT
33 fi
34 fi
35done
36
37date "+%b %d %Y, %H:%M:%S" >> $OUT
38
39exit 0
40
Note: See TracBrowser for help on using the repository browser.