most of adv search working. Still need subtree/filename filters
This commit is contained in:
+26
-3
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# @(#$Id: rclps,v 1.1 2005-02-02 17:57:08 dockes Exp $ (C) 2004 J.F.Dockes
|
||||
# @(#$Id: rclps,v 1.2 2005-10-19 10:21:48 dockes Exp $ (C) 2004 J.F.Dockes
|
||||
# Parts taken from Estraier:
|
||||
#================================================================
|
||||
# Estraier: a personal full-text search system
|
||||
@@ -34,6 +34,31 @@ fi
|
||||
|
||||
infile="$1"
|
||||
|
||||
iscmd()
|
||||
{
|
||||
cmd=$1
|
||||
case $cmd in
|
||||
*/*)
|
||||
if test -x $cmd ; then return 0; else return 1; fi ;;
|
||||
*)
|
||||
IFS=: ; set -- $PATH; unset IFS
|
||||
for d in $* ; do test -x $d/$cmd && return 0; done
|
||||
return 1 ;;
|
||||
esac
|
||||
}
|
||||
checkcmds()
|
||||
{
|
||||
for cmd in $*;do
|
||||
if iscmd $cmd
|
||||
then
|
||||
else
|
||||
echo $cmd not found 1>&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
}
|
||||
checkcmds $decoder iconv awk
|
||||
|
||||
# check the input file existence
|
||||
if test ! -f "$infile"
|
||||
then
|
||||
@@ -69,5 +94,3 @@ END {
|
||||
printf("</p></body></html>\n");
|
||||
}' | iconv -f iso-8859-1 -t UTF-8 -c -s
|
||||
|
||||
# exit normally
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user