/[hyperestraier]/trunk/filter/estfxasis
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/filter/estfxasis

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3 - (show annotations)
Fri Jul 29 21:57:20 2005 UTC (18 years, 9 months ago) by dpavlin
File size: 1057 byte(s)
make working copy from version 0.5.1

1 #! /bin/sh
2
3 #================================================================
4 # extfxasis
5 # Filter for Hyper Estraier, just through
6 #================================================================
7
8
9 # set variables
10 PATH="$PATH:/usr/local/bin:$HOME/bin:." ; export PATH
11 progname="estfxasis"
12
13
14 # check arguments
15 if [ $# -lt 1 ]
16 then
17 printf '%s: usage: %s infile [outfile]\n' "$progname" "$progname" 1>&2
18 exit 1
19 fi
20 infile="$1"
21 outfile="$2"
22 if [ -n "$ESTORIGFILE" ] && [ -f "$ESTORIGFILE" ]
23 then
24 infile="$ESTORIGFILE"
25 fi
26
27
28 # check the input
29 if [ "!" -f "$infile" ]
30 then
31 printf '%s: %s: no such file\n' "$progname" "$infile" 1>&2
32 exit 1
33 fi
34
35
36 # initialize the output file
37 if [ -n "$outfile" ]
38 then
39 rm -f "$outfile"
40 fi
41
42
43 # function to output
44 output(){
45 if [ -n "$outfile" ]
46 then
47 cat >> "$outfile"
48 else
49 cat
50 fi
51 }
52
53
54 # output the result
55 printf 'infile: %s\n' "$infile" 1>&2
56 printf 'outfile: %s\n' "$outfile" 1>&2
57 printf 'ESTORIGFILE: %s\n' "$ESTORIGFILE" 1>&2
58 cat "$infile" 2> "/dev/null" | output
59
60
61 # exit normally
62 exit 0
63
64
65
66 # END OF FILE

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26