This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/packages/sgml/RDF/rdf-parser
2009-03-13 19:39:06 +00:00

36 lines
703 B
Bash
Executable File

#!/bin/bash
#
# This is not the normal parser, just the front-end for the CGI interface.
# The real CGI stuff is written in Prolog in the file online.pl. The
# request is in online.html
#
# The RDF parser itself is just a Prolog library. See rdf2pl.{html,pdf}.
base=@BASEDIR@
tmp=/tmp/rdf-parser-$$
export ERROR_FILE=$tmp
ulimit -t 20 # seconds CPU time limit
function error()
{ cat << _EOM_
Content-type: text/plain
Sorry, an internal error occurred. For details, see below.
_EOM_
cat $tmp
rm -r $tmp
exit 0
}
cd $base > $tmp 2>&1
@SWI@ -f none -F none -t halt \
-g "load_files(online,[silent(true)]),go" 2>$tmp
case $? in
0) rm -f $tmp
exit 0 ;;
*) error ;;
esac