Commit 06391a32 authored by cmosh's avatar cmosh

Merge branch 'feature/finish_fix' into develop

parents 41c1ac01 68c314a5
...@@ -10,3 +10,5 @@ debian/*/* ...@@ -10,3 +10,5 @@ debian/*/*
.timelog-feature-sdsa .timelog-feature-sdsa
.seconds-feature-finish_fix .seconds-feature-finish_fix
.timelog-feature-finish_fix .timelog-feature-finish_fix
.seconds-feature-finish_fix
.timelog-feature-finish_fix
...@@ -358,6 +358,18 @@ cmd_finish() { ...@@ -358,6 +358,18 @@ cmd_finish() {
exit 1 exit 1
fi fi
echo $(date +%s) >> ".timelog-feature-$NAME"
LAST_LINE="$(wc -l < .timelog-feature-$NAME)"
PREV_LINE=$((LAST_LINE-1))
LAST_TIME=$(sed "${LAST_LINE}q;d" .timelog-feature-$NAME)
PREV_TIME=$(sed "${PREV_LINE}q;d" .timelog-feature-$NAME)
TIME_USED=$((LAST_TIME-PREV_TIME))
echo "$TIME_USED" >> ".seconds-feature-$NAME"
TOTAL_TIME=$(awk '{ sum += $1 } END { print sum }' .seconds-feature-$NAME) TOTAL_TIME=$(awk '{ sum += $1 } END { print sum }' .seconds-feature-$NAME)
TIME_EXPECTED=line=$(head -n 1 .timelog-feature-$NAME) TIME_EXPECTED=line=$(head -n 1 .timelog-feature-$NAME)
seconds=$TOTAL_TIME; FINALTIME=$((seconds/86400))" days "$(date -d "1970-01-01 + $seconds seconds" "+%H hours %M minutes %S seconds") seconds=$TOTAL_TIME; FINALTIME=$((seconds/86400))" days "$(date -d "1970-01-01 + $seconds seconds" "+%H hours %M minutes %S seconds")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment