Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit50dc2748ca7a3304a7e2e4accebc1c1e835439d3 (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-10-17 16:36:01 +0300
Committer
 Syndamia <kamen@syndamia.com>
2023-10-17 16:36:01 +0300
Files29340101e34b2f9e0eb7b36593fdbb4c25f42afa
csg-50dc2748ca7a3304a7e2e4accebc1c1e835439d3.tar
csg-50dc2748ca7a3304a7e2e4accebc1c1e835439d3.tar.gz
csg-50dc2748ca7a3304a7e2e4accebc1c1e835439d3.zip
Parente196fe2c81e69a08dad7c834556461d2cc6465fb (diff)
[s2] Fixed logic for timestamps
1 files changed, 4 insertions, 4 deletions
-rwxr-xr-xcsg8
diff --git a/csg b/csg
index cc0f9eb..ad2d41c 100755
--- a/csg
+++ b/csg
@@ -232,12 +232,12 @@ transform-file() {
startedGathering && /^$/ { exit }
END { print desc }' "$file")"
local words="$($CSG_AWK '{total += NF} END{print total}' "$file")"
- local timestamps=($($CSG_AWK -v file="$file" '
+ local timestamps=($($CSG_AWK -v file="$outf" '
BEGIN { FS = "\t" }
$1 == file {
print $2
exit
- }' "$file"))
+ }' "$CSG_TIMESTAMP_FILE"))
# Generate
$CSG_MD_TO_HTML "$file" > "$outf"
@@ -247,8 +247,8 @@ transform-file() {
-v title="$title" \
-v description="$descr" \
-v words="$words" \
- -v created="${timestamps[@]:0:3}" \
- -v edited="${timestamps[@]:4}" \
+ -v created="${timestamps[*]:0:3}" \
+ -v edited="${timestamps[*]:3}" \
$scr_libs $scripts -f "$CSG_TMP_DIR/csg-print.awk" \
"$outf" > "$outf.tmp"
mv "$outf.tmp" "$outf"