diff options
1 files changed, 8 insertions, 5 deletions
| -rwxr-xr-x | csg | 13 |
@@ -131,12 +131,15 @@ endTimer() { if [ -n "$CSG_TIMESTAMP_FILE" ] && isCommand 'git' then timestamps_writeDates() { - for file in $(find . -type f -name '*.md') + while read -r file do - dates=($(git log --follow --pretty=format:%ad --date="format:%d %B %Y" -- "$file")) - line="$DESTINATION${file:1:-2}html\t${dates[@]: -3:3} ${dates[@]:0:3}" - echo -e "$line" >> "$CSG_TIMESTAMP_FILE" - done + git log --follow --pretty=format:%ad --date="format:%d %B %Y" -- "$file" | $CSG_AWK -v dest="$DESTINATION" -v file="$file" ' + BEGIN { file = dest substr(file, 2, length(file) - 3) "html" } + NR == 1 { later = $0 } + END { print file "\t" $0 "\t" later }' >> "$CSG_TIMESTAMP_FILE" + done << EOF +$(find . -type f -name '*.md') +EOF } headc="$(git rev-parse HEAD)" |
