summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xversion.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/version.sh b/version.sh
index d98731e982..c8abc678ca 100755
--- a/version.sh
+++ b/version.sh
@@ -19,8 +19,15 @@ case "$OS" in
last_cvs_update="${year}${month}${day}-${hour}:${minute}"
;;
Darwin)
- # darwin's date has different meaning for -r
- last_cvs_update=`date +%y%m%d-%H:%M`
+ # Darwin/BSD 'date -r' does not print modification time
+ LS=`ls -lT CVS/Entries`
+ year=`echo $LS | cut -d' ' -f9 | cut -c 3-4`
+ month=`echo $LS | awk -F" " '{printf "%.2d", \
+ (index("JanFebMarAprMayJunJulAugSepOctNovDec",$7)+2)/3}'`
+ day=`echo $LS | cut -d' ' -f6`
+ hour=`echo $LS | cut -d' ' -f8 | cut -d: -f1`
+ minute=`echo $LS | cut -d' ' -f8 | cut -d: -f2`
+ last_cvs_update="${year}${month}${day}-${hour}:${minute}"
;;
*)
last_cvs_update=`date +%y%m%d-%H:%M`