From e09fae637a6d1ea3346c1cf0c2fa7703ec9739af Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 18 Mar 2024 10:49:03 -0500 Subject: Add ROOT template variable --- example/template.html | 2 +- schwa.awk | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/example/template.html b/example/template.html index c67ae0d..4bf3d2a 100644 --- a/example/template.html +++ b/example/template.html @@ -14,7 +14,7 @@ diff --git a/schwa.awk b/schwa.awk index 946a2cf..cdc558e 100755 --- a/schwa.awk +++ b/schwa.awk @@ -14,6 +14,8 @@ BEGIN { else TMPLV["CLONE"] = "" if (desc) TMPLV["DESCRIPTION"] = "
" desc "
" else TMPLV["DESCRIPTION"] = "" + if (root) TMPLV["ROOT"] = root + else TMPLV["ROOT"] = "/" "pwd" | getline TMPLV["DIRECTORY"]; close("pwd") TMPLV["DIRECTORY"] = outfn(TMPLV["DIRECTORY"], 3) } -- cgit 1.4.1-21-gabe81