switch to 64-bit default run paths
[unleashed-pkg5.git] / src / pydates.git
blobdc8578fa0d6657817025a32e55f055905f2f3e69
1 #!/bin/sh
4 # This file and its contents are supplied under the terms of the
5 # Common Development and Distribution License ("CDDL"), version 1.0.
6 # You may only use this file in accordance with the terms of version
7 # 1.0 of the CDDL.
9 # A full copy of the text of the CDDL should have accompanied this
10 # source. A copy of the CDDL is also available via the Internet
11 # at http://www.illumos.org/license/CDDL.
14 # Copyright 2012, Andrzej Szeszo
16 GITROOT=`git rev-parse --show-toplevel`
18 cd $GITROOT
20 FILES_TRACKED=`git ls-files src/modules|grep \.py$`
21 FILES_MODIFIED=`git diff --name-only src/modules|grep \.py$`
22 FILES_MODIFIED2=`echo $FILES_MODIFIED|sed s/\ /\|/`
24 for file in $FILES_TRACKED; do
25 case $file in
26 $FILES_MODIFIED2)
27 echo `stat -f %m $file` $file
30 echo `git log --pretty=format:'%at.0' -1 $file` $file
32 esac
33 done
35 FILES_MODIFIED=`git diff --cached --name-only --diff-filter=A; \
36 git diff --name-only`
38 if [ ! -z $FILES_MODIFIED ]; then
39 LATEST_TIMESTAMP=0
40 for file in $FILES_MODIFIED; do
41 MTIME=`stat -f %m $file`
42 [ $MTIME -gt $LATEST_TIMESTAMP ] && LATEST_TIMESTAMP=$MTIME
43 done
44 echo $LATEST_TIMESTAMP.0 .
45 else
46 echo `git log --pretty=format:'%at.0' -1` .