From 45db37efb5122ec7351fe0896d2c0261b472ea76 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 18 Mar 2024 10:25:12 -0500 Subject: Change static copying/ update readme --- schwa.awk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'schwa.awk') diff --git a/schwa.awk b/schwa.awk index 015b374..946a2cf 100755 --- a/schwa.awk +++ b/schwa.awk @@ -16,7 +16,6 @@ BEGIN { else TMPLV["DESCRIPTION"] = "" "pwd" | getline TMPLV["DIRECTORY"]; close("pwd") TMPLV["DIRECTORY"] = outfn(TMPLV["DIRECTORY"], 3) - copy_statics() } FNR == 1 { @@ -27,7 +26,7 @@ FNR == 1 { FILES[f++] = FILENAME printf("%s -> %s\n", FILENAME, OUTFILE) if (system("mkdir -p " OUTD outfn(FILENAME, 2))) - die(1, "Can't make directory " outfn(FILENAME, 2)) + die(1, "Can't make directory: " outfn(FILENAME, 2)) if (!system("cp " FILENAME " " outfn(FILENAME, 4))) TMPLV["RAWFILE"] = outfn(FILENAME, 3) OUTSTR = "" @@ -37,6 +36,7 @@ END { if (dead) exit dead finish() doindex() + copy_statics() } { @@ -129,7 +129,8 @@ function copy_statics () { split(static, STATICS, ":") for (s in STATICS) { printf("Copying %s\n", STATICS[s]) - if (system("cp " STATICS[s] " " outfn(STATICS[s], 4))) + print(OUTD outfn(STATICS[s], 3)) + if (system("cp " STATICS[s] " " OUTD outfn(STATICS[s], 3))) die(2, "Can't copy static file: " STATICS[s]) } } -- cgit 1.4.1-21-gabe81