Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commitf39bb5ca1b498d9b7fc556ff6026efc08b46ab8a (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-10-23 15:01:04 +0300
Committer
 Syndamia <kamen@syndamia.com>
2023-10-23 15:01:04 +0300
Files86478f45ef6991f111b75a6e9d9beb98ac9ed17e
csg-f39bb5ca1b498d9b7fc556ff6026efc08b46ab8a.tar
csg-f39bb5ca1b498d9b7fc556ff6026efc08b46ab8a.tar.gz
csg-f39bb5ca1b498d9b7fc556ff6026efc08b46ab8a.zip
Parent222d2dc7f3ec3ec9ce254a70f386e84804f4be39 (diff)
[s2] POSIX Reworked created and edited values to not use arrays
1 files changed, 8 insertions, 4 deletions
-rwxr-xr-xcsg12
diff --git a/csg b/csg
index 803ac74..870c88a 100755
--- a/csg
+++ b/csg
@@ -247,11 +247,15 @@ $($CSG_AWK -v titlef="$TITLEF" '
END { print title ORS desc ORS words }' "$file")
EOF
+ local created edited
+ { read -r created; read -r edited; } << EOF
+$($CSG_AWK -v file="$outf" '
BEGIN { FS = "\t" }
$1 == file {
- print $2
+ print $2 ORS $3
exit
- }' "$CSG_TIMESTAMP_FILE"))
+ }' "$CSG_TIMESTAMP_FILE")
+EOF
# Generate
$CSG_MD_TO_HTML "$file" > "$outf"
@@ -261,8 +265,8 @@ EOF
-v title="$title" \
-v description="$descr" \
-v words="$words" \
- -v created="${timestamps[*]:0:3}" \
- -v edited="${timestamps[*]:3}" \
+ -v created="$created" \
+ -v edited="$edited" \
$scr_libs $scripts -f "$CSG_TMP_DIR/csg-print.awk" \
"$outf" > "$outf.tmp"
mv "$outf.tmp" "$outf"