Now calculating exact days for all past days for gentasktime
parent
25e5f29371
commit
584854c33f
|
@ -19,23 +19,19 @@ domake \
|
||||||
&& \
|
&& \
|
||||||
(
|
(
|
||||||
echo -n '0 ' && gendate && tail -n1 taskstats.dat \
|
echo -n '0 ' && gendate && tail -n1 taskstats.dat \
|
||||||
&& git log --no-merges --pretty=format:'%ar %h' -- "$path" \
|
&& git log --no-merges --pretty=format:'%at %h' -- "$path" \
|
||||||
| awk '
|
| awk '
|
||||||
BEGIN {
|
BEGIN {
|
||||||
last=""
|
last=0
|
||||||
|
now=systime()
|
||||||
}
|
}
|
||||||
|
|
||||||
/(days|weeks) ago|^(1[5-9]|2[0-9]) hours ago/{
|
{
|
||||||
if ( $0 ~ /hours/ ) {
|
# calculate the number of days ago this was
|
||||||
$1 = 1
|
ago = int( ( now - $1 ) / 86400 );
|
||||||
}
|
if ( ago <= last ) next;
|
||||||
if ( $0 ~ /weeks/ ) {
|
last = ago;
|
||||||
$1 = $1*7
|
print ago, $NF;
|
||||||
}
|
|
||||||
if ( $1 == last ) next;
|
|
||||||
if ( $1 < last ) next;
|
|
||||||
last = $1;
|
|
||||||
print $1, $NF;
|
|
||||||
}
|
}
|
||||||
' \
|
' \
|
||||||
| while read n h; do
|
| while read n h; do
|
||||||
|
|
Loading…
Reference in New Issue