Rev 827 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
14 | reyssat | 1 | #! /bin/sh |
2 | # |
||
3 | # Name: this is file "coqweb" |
||
4 | # Extension: shell script |
||
5 | # Function: interface coqweb pour wims |
||
6 | # Install: should be in ${w_wims_home}/public_html/bin |
||
7 | # to be executable by wims's phtml |
||
8 | # usage for testing: ./coqweb_test |
||
9 | # |
||
10 | # usage from phtml: |
||
11 | # !exec coqweb version debug_level |
||
12 | # => wims calls : ${w_wims_home}/public_html/bin/coqweb |
||
13 | # parms are in env's wims_exec_parm |
||
14 | |||
15 | # |
||
16 | # If debug on |
||
17 | # |
||
827 | bpr | 18 | if [ "$w_croq6_dbg_level" = "1" ];then |
17347 | bpr | 19 | echo "[coqweb] called with $* ;;<br>" |
20 | echo "<br>env start <br>" |
||
14 | reyssat | 21 | env >/tmp/env$$ |
17347 | bpr | 22 | sed "s/$/<br>/" </tmp/env$$ >/tmp/sed$$ |
14 | reyssat | 23 | cat /tmp/sed$$ |
24 | rm /tmp/env$$ /tmp/sed$$ |
||
17347 | bpr | 25 | echo "<br>env end" |
26 | echo "<br>coqweb start <br>" |
||
14 | reyssat | 27 | fi |
28 | # |
||
29 | # The tuning |
||
30 | # |
||
31 | export TEMPS_LIMITE=50 |
||
32 | # |
||
33 | # the basic coq parms |
||
34 | # |
||
35 | export COQWEBDIR=/var/lib/coqweb/coqweb2/ |
||
36 | export COQWEBCOQ=/usr/bin/coqtop |
||
37 | export MODE=wims |
||
38 | |||
39 | rm -f $tmp_dir/biblio* |
||
40 | |||
41 | ## bin/ch..root coqweb_wims2 <<@ |
||
42 | bin/ch..root cww <<@ |
||
43 | $wims_exec_parm |
||
44 | @ |
||
45 | |||
46 | # |
||
47 | # If debug on |
||
48 | # |
||
827 | bpr | 49 | if [ "$w_croq6_dbg_level" = "1" ];then |
17347 | bpr | 50 | echo "<br>coqweb end <br>" |
14 | reyssat | 51 | fi |
52 | |||
53 | if [ -f $tmp_dir/biblio_content ]; then |
||
54 | fname=`cat $tmp_dir/biblio_name | grep -v '\.\.'` |
||
55 | mv -f $tmp_dir/biblio_content $w_wims_home/chroot/var/lib/coqweb/coqweb2/bibliotheque/$fname |
||
56 | fi |
||
57 | |||
58 | if [ -f $tmp_dir/biblio_content2 ]; then |
||
59 | fname=`cat $tmp_dir/biblio_name2 | grep -v '\.\.'` |
||
60 | mv -f $tmp_dir/biblio_content2 $w_wims_home/chroot/var/lib/coqweb/coqweb2/bibliotheque/$fname |
||
61 | fi |
||
62 | |||
63 | if [ -f $tmp_dir/biblio_content3 ]; then |
||
64 | fname=`cat $tmp_dir/biblio_name3 | grep -v '\.\.'` |
||
65 | mv -f $tmp_dir/biblio_content3 $w_wims_home/chroot/var/lib/coqweb/coqweb2/bibliotheque/$fname |
||
66 | fi |
||
67 | |||
68 | if [ -f $tmp_dir/biblio_content4 ]; then |
||
69 | fname=`cat $tmp_dir/biblio_name4 | grep -v '\.\.'` |
||
70 | mv -f $tmp_dir/biblio_content4 $w_wims_home/chroot/var/lib/coqweb/coqweb2/bibliotheque/$fname |
||
71 | fi |
||
72 |