comparison version.sh @ 18594:1b4fc7410e4d

Drop all system-specific version generation stuff.
author diego
date Tue, 06 Jun 2006 12:00:07 +0000
parents 99a9c47040c0
children c55903d85291
comparison
equal deleted inserted replaced
18593:99a9c47040c0 18594:1b4fc7410e4d
1 #!/bin/sh 1 #!/bin/sh
2 2
3 OS=`uname -s`
4 case "$OS" in
5 CYGWIN*|Linux|MINGW*)
6 last_cvs_update=r`grep committed-rev .svn/entries | head -n 1 | cut -d '"' -f 2 2>/dev/null` 3 last_cvs_update=r`grep committed-rev .svn/entries | head -n 1 | cut -d '"' -f 2 2>/dev/null`
7 ;;
8 Darwin|*BSD*)
9 # BSD 'date -r' does not print modification time
10 # LC_ALL=C sets month/day order and English language in the date string
11 # The if in the awk call works around wrong day/month order.
12 last_cvs_update=`LC_ALL=C ls -lT .svn | \
13 awk '{ \
14 day=$7; \
15 month=index(" JanFebMarAprMayJunJulAugSepOctNovDec", $6); \
16 if(month==0) { \
17 day=$6; \
18 month=index(" JanFebMarAprMayJunJulAugSepOctNovDec",$7); } \
19 printf("%s%.02d%.02d-%s", \
20 substr($9, 3, 2), (month+1)/3, day, substr($8, 0, 5)); \
21 }'`
22 ;;
23 *)
24 last_cvs_update=`date +%y%m%d-%H:%M`
25 ;;
26 esac
27 4
28 extra="" 5 extra=""
29 if test "$1" ; then 6 if test "$1" ; then
30 extra="-$1" 7 extra="-$1"
31 fi 8 fi