diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2013-03-12 17:25:22 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2013-03-12 17:25:22 +0200 |
commit | cfa111e835e6467b2ee005f351daaacff2d6bb4c (patch) | |
tree | f43dc43b397877d1cbc5c8f92c90243ec60f9b40 /src | |
parent | aac53277a35cb9f765ba8c460b252f59f7817648 (diff) | |
download | wydawca-cfa111e835e6467b2ee005f351daaacff2d6bb4c.tar.gz wydawca-cfa111e835e6467b2ee005f351daaacff2d6bb4c.tar.bz2 |
Minor change.
* doc/wydawca.texi: Document the use of -d together with -t.
* src/update-2.0.awk: Remove.
* src/Makefile.am: Update.
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/update-2.0.awk | 187 |
2 files changed, 1 insertions, 188 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index c4be551..e286dfb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -57,7 +57,7 @@ wydawca_SOURCES=\ $(WATCHER_C) BUILT_SOURCES=cmdline.h -EXTRA_DIST=cmdline.opt pp-setup update-2.0.awk +EXTRA_DIST=cmdline.opt pp-setup SUFFIXES=.opt .c .h diff --git a/src/update-2.0.awk b/src/update-2.0.awk deleted file mode 100644 index da012b1..0000000 --- a/src/update-2.0.awk +++ /dev/null @@ -1,187 +0,0 @@ -# This file is part of Wydawca -# Copyright (C) 2007, 2009-2011 Sergey Poznyakoff -# -# Wydawca is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# Wydawca is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Wydawca. If not, see <http://www.gnu.org/licenses/>. - -state == 1 && NF == 1 && $1 == "end" { - print "EOT;" - state = 0 - next -} -state == 1 && $1 == "include" { - printf("m4_include(%s)\n",$2) - next -} -state == 1 { gsub(/%%/, "~~~") - gsub(/%/, "$") - gsub(/~~~/, "%") - print $0 - next -} - -/[ \t]*#/ { print; next } -NF == 0 { print; next } - -{ if (!text) start_line = NR } -/\\$/ { text = text substr($0, 1, length($0)-1); next } -{ if (text) $0 = text $0; text = "" } - -$1 == "statistics" { printf("%s;\n", $0); next } - -$1 == "syslog-facility" { syslog_facility = $2; next } -$1 == "syslog-tag" { sub(($1 "[ \t]*"),"") - syslog_tag = $0 - next } -$1 == "syslog-print-priority" { - sub(($1 "[ \t]*"),"") - syslog_print_prio = $0 - next } - -function get_indent( i, len) { - len = length($0) - gsub(/^[ \t]*/,"") - return len - length($0) -} - -function indent(len) { - while (len--) - printf(" ") -} - -$1 == "enable-sendfile" { next } - -$1 == "file-sweep-time" || $1 == "tar-program" || $1 == "admin-address" || - $1 == "from-address" || $1 == "host" || $1 == "database" || - $1 == "user" || $1 == "password" || - $1 == "source" || $1 == "destination"{ - len = get_indent() - kw = $1 - sub(($1 "[ \t]*"),"") - indent(len) - printf("%s \"%s\";\n", kw, $0) - next -} - -$1 == "umask" { - len = get_indent() - kw = $1 - sub(($1 "[ \t]*"),"") - indent(len) - printf("%s %s;\n", kw, $0) - next -} - -$1 == "archive" { - len = get_indent() - kw = $1 - indent(len) - printf("archive %s", $2) - if (NF > 2) { - print " {" - indent(len + 2) - printf("name \"%s\";\n", $3) - if (NF > 3) { - indent(len + 2) - printf("backup %s;\n", $4) - } - indent(len) - print "}" - } else - print ";" -} - -$1 == "project-owner" || $1 == "user-data" || $1 == "verify-user" || - $1 == "gpg-key" { - len = get_indent() - indent(len) - printf("access-method %s {\n", $1); - indent(len + 2) - printf("type %s;\n", $2) - if (NF > 2) { - if (NF > 3) { - indent(len + 2) - printf("query \""); - for (i = 4; i < NF; i++) - printf("%s ", $i) - printf("%s\"", $NF) - print ";" - } - indent(len + 2) - printf("params (%s);\n", $3) - } - indent(len) - print("}") - next -} - -$1 == "sql" { - printf("sql %s {\n", $2); - next -} - -$1 == "directory" { - printf("spool ") - if (NF > 1) - printf("%s ", $2) - print "{" - next -} - -$1 == "end" { print "}"; next } - -$1 == "mail-admin-stat" { - print "mail-statistics {" - printf(" message @%s;\n", $2); - if (NF > 2) { - printf(" statistics"); - for (i = 3; i <= NF; i++) - printf(" %s", $i) - print ";" - } - print "}" - next -} - -$1 == "notify-event" { - printf("notify-event {\n"); - printf(" event %s;\n", $2); - printf(" recipient %s;\n", $3); - printf(" message @%s;\n", $4); - print "}" - next -} - -$1 == "define-message" { - print "define-message", $2, "<<EOT" - state = 1 - next -} - -$1 == "include" { - printf("#include <%s>\n", $2); -} - -END { - if (syslog_facility || syslog_tag || syslog_print_prio) { - print "syslog {" - if (syslog_facility) - printf(" facility %s;\n", syslog_facility); - if (syslog_tag) - printf(" tag %s;\n", syslog_tag); - if (syslog_print_prio) - printf(" print-priority %s;\n", syslog_print_prio); - print "}" - } -} - |