diff options
-rw-r--r-- | render.awk | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -61,10 +61,13 @@ function category_header(category, i, dst){ function get_link_categories(a){ delete cats; - split(a, cats, /[:blank:]*,[:blank:]*/); + split(a, cats, /([[:blank:]*],[[:blank:]]*|,[[:blank:]]*)/); + printf("%s -> ", a) >/dev/stderr; for (k in cats){ + printf("%s ", cats[k])>/dev/stderr; gsub(/ +/, "", cats[k]); } + print > /dev/stderr } ######################################## @@ -80,8 +83,8 @@ function render_categories(category, cnum, link, lnum){ cname=category[i,"Name"]; cfiles[cname]=BASEDIR category[i,"Selector"]; "dirname " cfiles[cname] | getline bdir; - if (system("ls -d " bdir " >/dev/null") >0){ - system("mkdir " bdir); + if (system("ls -d " bdir " 2>/dev/null") >0){ + system("mkdir -p " bdir); } cmd=sprintf("rm -f %s", cfiles[cname]); system(cmd); |