hide awk BEGIN statements - make debian linda happy

This commit is contained in:
dockes 2007-01-30 11:39:32 +00:00
parent 953a67c49c
commit 4f0c17d2e6
7 changed files with 36 additions and 22 deletions

View File

@ -1,5 +1,5 @@
#!/bin/sh
# @(#$Id: rcldjvu,v 1.2 2006-04-04 16:03:28 dockes Exp $ (C) 2005 J.F.Dockes
# @(#$Id: rcldjvu,v 1.3 2007-01-30 11:36:02 dockes Exp $ (C) 2005 J.F.Dockes
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -82,7 +82,7 @@ title=`djvused "$infile" -e 'select 1;output-ant' | \
grep ' (title ' | sed -e 's/^.* (title //' -e 's/)$//' |\
awk '
{
printf("BEGIN {s = %s; print s}\n", $0)
printf("BEGIN" " {s = %s; print s}\n", $0)
}' | awk -f -`
@ -96,9 +96,11 @@ cat <<EOF
<pre>
EOF
# The strange 'BEGIN' setup is to prevent 'file' from thinking this file
# is an awk program
djvutxt "$infile" | sed -e 's/[ ][ ]*$//' | \
awk '
BEGIN {
awk 'BEGIN'\
' {
cont = ""
}
{

View File

@ -1,5 +1,5 @@
#!/bin/sh
# @(#$Id: rcldoc,v 1.5 2006-01-27 13:37:31 dockes Exp $ (C) 2004 J.F.Dockes
# @(#$Id: rcldoc,v 1.6 2007-01-30 11:36:02 dockes Exp $ (C) 2004 J.F.Dockes
# Parts taken from Estraier:
#================================================================
# Estraier: a personal full-text search system
@ -69,9 +69,11 @@ then
fi
# output the result
# The strange 'BEGIN' setup is to prevent 'file' from thinking this file
# is an awk program
$decoder "$infile" |
awk '
BEGIN {
awk 'BEGIN'\
' {
print "<html><head><title></title>"
print "<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">"
print "</head>\n<body>\n<p>"

View File

@ -1,5 +1,5 @@
#!/bin/sh
# @(#$Id: rcldvi,v 1.2 2006-02-03 11:47:47 dockes Exp $ (C) 2006 J.F.Dockes
# @(#$Id: rcldvi,v 1.3 2007-01-30 11:36:02 dockes Exp $ (C) 2006 J.F.Dockes
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -75,9 +75,11 @@ if test X$decoder = Xdvips ; then
exit $?
fi
# The strange 'BEGIN' setup is to prevent 'file' from thinking this file
# is an awk program
$decoder "$infile" |
awk '
BEGIN {
awk 'BEGIN'\
' {
printf("<html><head><title></title>\n")
printf("<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">\n")
printf("</head>\n<body><p>");

View File

@ -1,5 +1,5 @@
#!/bin/sh
# @(#$Id: rclpdf,v 1.6 2006-01-27 13:37:31 dockes Exp $ (C) 2004 J.F.Dockes
# @(#$Id: rclpdf,v 1.7 2007-01-30 11:36:02 dockes Exp $ (C) 2004 J.F.Dockes
# This is copied almost verbatim from Estraier:
#================================================================
# Estraier: a personal full-text search system
@ -76,10 +76,12 @@ checkcmds()
checkcmds pdftotext iconv awk
# Run pdftotext and fix the result (add a charset tag and fix the html escaping
# The strange 'BEGIN' setup is to prevent 'file' from thinking this file
# is an awk program
pdftotext $optionraw -htmlmeta -enc UTF-8 -eol unix -q "$infile" - |
iconv -f UTF-8 -t UTF-8 -c -s |
awk '
BEGIN {
awk 'BEGIN'\
' {
doescape = 0
cont = ""
charsetmeta = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">"

View File

@ -1,5 +1,5 @@
#!/bin/sh
# @(#$Id: rclps,v 1.7 2006-04-04 16:03:28 dockes Exp $ (C) 2004 J.F.Dockes
# @(#$Id: rclps,v 1.8 2007-01-30 11:36:02 dockes Exp $ (C) 2004 J.F.Dockes
# Parts taken from Estraier:
#================================================================
# Estraier: a personal full-text search system
@ -74,9 +74,11 @@ then
fi
# output the result
# The strange 'BEGIN' setup is to prevent 'file' from thinking this file
# is an awk program
$decoder "$infile" |
awk '
BEGIN {
awk 'BEGIN'\
' {
printf("<html><head><title></title>\n")
printf("<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">\n")
printf("</head>\n<body><p>");

View File

@ -1,5 +1,5 @@
#!/bin/sh
# @(#$Id: rclrtf,v 1.2 2005-11-23 10:17:53 dockes Exp $ (C) 2004 J.F.Dockes
# @(#$Id: rclrtf,v 1.3 2007-01-30 11:36:02 dockes Exp $ (C) 2004 J.F.Dockes
# Some inspiration from estraier
#================================================================
# rclrtf
@ -57,9 +57,11 @@ checkcmds()
checkcmds awk unrtf
# output the result
# The strange 'BEGIN' setup is to prevent 'file' from thinking this file
# is an awk program
unrtf --nopict --html "$infile" 2> /dev/null |
awk '
BEGIN {
awk 'BEGIN'\
' {
gothead = 0
}
/<\/head>/{

View File

@ -1,5 +1,5 @@
#!/bin/sh
# @(#$Id: rclsoff,v 1.7 2007-01-21 16:41:40 dockes Exp $ (C) 2004 J.F.Dockes
# @(#$Id: rclsoff,v 1.8 2007-01-30 11:36:02 dockes Exp $ (C) 2004 J.F.Dockes
# Parts taken from Estraier:
#================================================================
# Estraier: a personal full-text search system
@ -122,9 +122,11 @@ echo '<meta name="description" content="' "$description $subject" '">'
echo '<meta name="keywords" content="' "$keywords" '">'
echo '</head><body><p>'
# The strange 'BEGIN' setup is to prevent 'file' from thinking this file
# is an awk program
echo "$content" | sed -e "s/&apos;/'/g" -e 's/&quot;/"/g' |\
awk '
BEGIN {
awk 'BEGIN'\
' {
cont = ""
}
{