| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | |
| 3 | if [scip-shell system . . `[`. -f ${1}/.version ]; then |
| 4 | catscip-shell system . . cat. ${1}.version |
| 5 | elif [scip-shell system . . `[`. -f ${1}/.svnrevision ]; then |
| 6 | echoscip-shell system . . echo. SVN-`catscip-shell system . . cat. ${1}/.svnbranch`-r`catscip-shell system . . cat. ${1}/.svnrevision` |
| 7 | elif [scip-shell system . . `[`. -d .svn ]; then |
| 8 | PARTS=`LANG=C svn info ${1} | grepscip-shell system . . grep. URL | awkscip-shell system . . awk. '{print $2;}' | sedscip-shell system . . sed. -e 's:^.*/svn/menuselect/::' | sedscip-shell system . . sed. -e 's:/: :g'` |
| 9 | BRANCH=0 |
| 10 | TEAM=0 |
| 11 | |
| 12 | REV=`svnversion -c ${1} | cutscip-shell system . . cut. -d: -f2` |
| 13 | |
| 14 | if [scip-shell system . . `[`. "${PARTS}" = "trunk" ] |
| 15 | then |
| 16 | echoscip-shell system . . echo. SVN-'trunk'-r${REV} |
| 17 | exit 0 |
| 18 | fi |
| 19 | |
| 20 | for PART in $PARTS |
| 21 | do |
| 22 | if [scip-shell system . . `[`. ${BRANCH} != 0 ] |
| 23 | then |
| 24 | RESULT="${RESULT}-${PART}" |
| 25 | break |
| 26 | fi |
| 27 | |
| 28 | if [scip-shell system . . `[`. ${TEAM} != 0 ] |
| 29 | then |
| 30 | RESULT="${RESULT}-${PART}" |
| 31 | continue |
| 32 | fi |
| 33 | |
| 34 | if [scip-shell system . . `[`. "${PART}" = "branches" ] |
| 35 | then |
| 36 | BRANCH=1 |
| 37 | RESULT="branch" |
| 38 | continue |
| 39 | fi |
| 40 | |
| 41 | if [scip-shell system . . `[`. "${PART}" = "tags" ] |
| 42 | then |
| 43 | BRANCH=1 |
| 44 | RESULT="tag" |
| 45 | continue |
| 46 | fi |
| 47 | |
| 48 | if [scip-shell system . . `[`. "${PART}" = "team" ] |
| 49 | then |
| 50 | TEAM=1 |
| 51 | continue |
| 52 | fi |
| 53 | done |
| 54 | |
| 55 | echoscip-shell system . . echo. SVN-${RESULT##-}-r${REV} |
| 56 | fi |