dotfiles

Dotfiles for my OpenBSD environment.
git clone https://git.mtkn.jp/dotfiles
Log | Files | Refs

commit 608e1d408cd961ce711e89f95162473022e84e83
parent 43d7d8364f115f9a45e754be2676cb52a67717a4
Author: Matsuda Kenji <contact2655@matsudakenji.xyz>
Date:   Mon, 15 Aug 2022 08:36:29 +0900

add note for non-posix command

Diffstat:
Mbin/kagero | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/bin/kagero b/bin/kagero @@ -2,6 +2,7 @@ #TODO: stat(1) is not in POSIX: 7/14 removed stat(1) but not yet tested well. # pathnames should not contain white spaces #BUG: non html files are not copied after changed its directory. +# strftime() for awk is not POSIX compliant man=$(pwd)/man pub=$(pwd)/pub @@ -48,7 +49,7 @@ render_sitemap(){ echo '<?xml version="1.0" encoding="UTF-8"?>' echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' cat | - awk '{print strftime("%Y-%m-%d", $1), $2}' | + awk '{print strftime("%Y-%m-%d", $1), $2}' | #not posix sort -hr | sed 's! \./! /!;s!/index.html!/!' | sed -E 's;(^....-..-..?) (.*$);<url><loc>'"$url"'\2</loc><lastmod>\1</lastmod></url>;' @@ -71,7 +72,7 @@ render_rss(){ cat | while read date file; do atitle=$(grep '<h1>' $man$file | sed 's;<h1>\(.*\)</h1>;\1;') - date=$(echo $date | awk '{print strftime("%a, %e %b %Y %H:%M:%S %z", $1)}') + date=$(echo $date | awk '{print strftime("%a, %e %b %Y %H:%M:%S %z", $1)}') #not posix echo '<item>' echo '<title>'"$atitle"'</title>' echo '<link>'"$url$file"'</link>'