site

My personal website.

Date: Tue, 13 Jul 2021 11:51:42 +0200

Simplify translating file names in generate

Diffstat:

M generate                            |       2 +-

1 file changed, 1 insertion(+), 1 deletion(-)

@@ -189,7 +189,7 @@ cp -rf . "$dir"
 files="$(find "$dir" -name '*.gmi')"
 
 while read -r file <&4; do
-    awk "$program" "$file" > "$(printf '%s/%s.%s' "$(dirname "$file")" "$(basename -s '.gmi' "$file")" "$extension")"
+    awk "$program" "$file" > "$(printf "%s" "$file" | sed "s/\.gmi/.$extension/")"
 done 4<< EOF
 $files
 EOF