about summary refs log tree commit diff stats
path: root/schwa.awk
diff options
context:
space:
mode:
Diffstat (limited to 'schwa.awk')
-rwxr-xr-xschwa.awk7
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
22FNR == 1 { 21FNR == 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}