diff options
author | Case Duckworth | 2024-03-18 10:25:12 -0500 |
---|---|---|
committer | Case Duckworth | 2024-03-18 10:25:12 -0500 |
commit | 45db37efb5122ec7351fe0896d2c0261b472ea76 (patch) | |
tree | 254bee43722b49fcf302ed4cef0032853fa8b709 /schwa.awk | |
parent | Update README (diff) | |
download | schwa-45db37efb5122ec7351fe0896d2c0261b472ea76.tar.gz schwa-45db37efb5122ec7351fe0896d2c0261b472ea76.zip |
Change static copying/ update readme
Diffstat (limited to 'schwa.awk')
-rwxr-xr-x | schwa.awk | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/schwa.awk b/schwa.awk index 015b374..946a2cf 100755 --- a/schwa.awk +++ b/schwa.awk | |||
@@ -16,7 +16,6 @@ BEGIN { | |||
16 | else TMPLV["DESCRIPTION"] = "" | 16 | else TMPLV["DESCRIPTION"] = "" |
17 | "pwd" | getline TMPLV["DIRECTORY"]; close("pwd") | 17 | "pwd" | getline TMPLV["DIRECTORY"]; close("pwd") |
18 | TMPLV["DIRECTORY"] = outfn(TMPLV["DIRECTORY"], 3) | 18 | TMPLV["DIRECTORY"] = outfn(TMPLV["DIRECTORY"], 3) |
19 | copy_statics() | ||
20 | } | 19 | } |
21 | 20 | ||
22 | FNR == 1 { | 21 | FNR == 1 { |
@@ -27,7 +26,7 @@ FNR == 1 { | |||
27 | FILES[f++] = FILENAME | 26 | FILES[f++] = FILENAME |
28 | printf("%s -> %s\n", FILENAME, OUTFILE) | 27 | printf("%s -> %s\n", FILENAME, OUTFILE) |
29 | if (system("mkdir -p " OUTD outfn(FILENAME, 2))) | 28 | if (system("mkdir -p " OUTD outfn(FILENAME, 2))) |
30 | die(1, "Can't make directory " outfn(FILENAME, 2)) | 29 | die(1, "Can't make directory: " outfn(FILENAME, 2)) |
31 | if (!system("cp " FILENAME " " outfn(FILENAME, 4))) | 30 | if (!system("cp " FILENAME " " outfn(FILENAME, 4))) |
32 | TMPLV["RAWFILE"] = outfn(FILENAME, 3) | 31 | TMPLV["RAWFILE"] = outfn(FILENAME, 3) |
33 | OUTSTR = "" | 32 | OUTSTR = "" |
@@ -37,6 +36,7 @@ END { | |||
37 | if (dead) exit dead | 36 | if (dead) exit dead |
38 | finish() | 37 | finish() |
39 | doindex() | 38 | doindex() |
39 | copy_statics() | ||
40 | } | 40 | } |
41 | 41 | ||
42 | { | 42 | { |
@@ -129,7 +129,8 @@ function copy_statics () { | |||
129 | split(static, STATICS, ":") | 129 | split(static, STATICS, ":") |
130 | for (s in STATICS) { | 130 | for (s in STATICS) { |
131 | printf("Copying %s\n", STATICS[s]) | 131 | printf("Copying %s\n", STATICS[s]) |
132 | if (system("cp " STATICS[s] " " outfn(STATICS[s], 4))) | 132 | print(OUTD outfn(STATICS[s], 3)) |
133 | if (system("cp " STATICS[s] " " OUTD outfn(STATICS[s], 3))) | ||
133 | die(2, "Can't copy static file: " STATICS[s]) | 134 | die(2, "Can't copy static file: " STATICS[s]) |
134 | } | 135 | } |
135 | } | 136 | } |