File tree Expand file tree Collapse file tree 1 file changed +20
-13
lines changed Expand file tree Collapse file tree 1 file changed +20
-13
lines changed Original file line number Diff line number Diff line change 9
9
10
10
OWD=` pwd`
11
11
cd " $1 "
12
- SVN=svn
13
- for paths in /usr/local/bin /opt/R/arm64/bin; do
14
- if [ -e " $paths /svn" ]; then
15
- SVN=" $paths /svn"
16
- fi
17
- done
18
- SVNREV=` $SVN info | sed -n ' s/Revision:[ \t]*//p' `
19
- if [ -z " $SVNREV " -a -f .svn/entries ]; then
20
- SVNREV=` sed -n ' s/.*revision="\(.*\)".*/\1/p' .svn/entries| head -n 1`
21
- if [ -z " $SVNREV " ]; then
22
- # SVN 1.4 changed the format - this is a pure guess!! (line 4 = revision)
23
- SVNREV=` sed -n -e ' 4 p' .svn/entries`
24
- fi
12
+
13
+ if [ -e .svn ]; then
14
+ SVN=svn
15
+ for paths in /usr/local/bin /opt/R/arm64/bin; do
16
+ if [ -e " $paths /svn" ]; then
17
+ SVN=" $paths /svn"
18
+ fi
19
+ done
20
+ SVNREV=` $SVN info | sed -n ' s/Revision:[ \t]*//p' `
21
+ if [ -z " $SVNREV " -a -f .svn/entries ]; then
22
+ SVNREV=` sed -n ' s/.*revision="\(.*\)".*/\1/p' .svn/entries| head -n 1`
23
+ if [ -z " $SVNREV " ]; then
24
+ # SVN 1.4 changed the format - this is a pure guess!! (line 4 = revision)
25
+ SVNREV=` sed -n -e ' 4 p' .svn/entries`
26
+ fi
27
+ fi
28
+ elif [ -e REVISION ]; then
29
+ SVNREV=` cat REVISION`
30
+ elif [ -e .git ]; then
31
+ SVNREV=` git rev-parse --short HEAD`
25
32
fi
26
33
echo " Revision: $SVNREV "
27
34
You can’t perform that action at this time.
0 commit comments