=== modified file 'bin/fileset.awk' --- bin/fileset.awk 2015-12-09 22:13:01 +0000 +++ bin/fileset.awk 2015-12-09 08:05:43 +0000 @@ -52,8 +52,8 @@ function print_rsfilter(str) { if ("RSFILTER" in ENVIRON) { print str >>ENVIRON["RSFILTER"] - # } else { - # print str >>"/dev/stderr" + } else { + print str >>"/dev/stderr" } } @@ -165,7 +165,7 @@ printf_fmt = crest ~ /n/ || (crest !~ /N/ && content !~ /\n$/) ? \ "%s\\n" : "%s" - func_name = "f" func_name++ + func_name = "f_" func_name++ funcs[func_name] = "\tprintf '"printf_fmt"' "quoted(content) if(crest ~ /a/) { @@ -183,7 +183,7 @@ shellfunc("f", crest) content = get_argument(cchar == "B") - func_name = "f" func_name++ + func_name = "f_" func_name++ funcs[func_name] = "\tbase64 <<<"quoted(content) if(crest ~ /a/) { @@ -264,7 +264,7 @@ } BEGIN { - print_b("check_main() {") + print_b("check_main() {" } { parse_line($0) } @@ -272,10 +272,10 @@ END { process_statement() print_e("}") - print_b("do_main() {") + print_b("check_main() {") print_i("true") print_e("}") - print "" + print print_functions() - print_i("req main") + print_i "req main" } === modified file 'bin/fileset_inc.sh' --- bin/fileset_inc.sh 2015-12-09 22:13:01 +0000 +++ bin/fileset_inc.sh 2015-12-09 08:05:43 +0000 @@ -1,7 +1,7 @@ #!/bin/sh export fname die() { - printf '%s\n' "$*" + printf '%s\\n' \"$*\" exit 1 } @@ -17,19 +17,6 @@ case "$1" in (*o*) f_o=true;; (*) f_o=false;; esac } - -print_flags() { - $f_bang && printf '!' - $f_p && printf p - $f_f && printf f - $f_r && printf r - $f_n && printf n - $f_N && printf N - $f_a && printf a - $f_i && printf i - $f_o && printf o -} - # TODO: search $PATH if ! test -x /bin/readlink -o -x /usr/bin/readlink; then # Hackity hack. If you know of better way, let me know. @@ -49,9 +36,9 @@ req() { if ! "check_$@"; then if $check_only; then - die "check failed on '$fname': $* ($(print_flags))" + die "check failed on $filename: $*" else - "do_$1" || die "action failed on '$fname': $* ($(print_flags))" + "do_$1" || die "action failed on $filename: $*" check_only=true req "$@" check_only=false @@ -61,7 +48,7 @@ check_p() { - test -d "$(dirname "$fname")" + test -d "$(dirname "$filename")" } do_p() {