Subversion Repositories wimsdev

Rev

Rev 23 | Rev 3854 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
23 reyssat 1
#! /bin/sh
2
# We use shell script to output oef source file, because
3
# otherwise the $ sign will be substituted.
4
 
5
if [ -z "$w_catmodule" ]; then
6
 classd=$w_wims_home/log/classes/$w_wims_class
7
 oefname=$classd/src/$wims_exec_parm.oef
8
else
9
 moduled=modules/$w_catmodule
10
 test1=`grep -E '^[[:blank:]]*category[[:blank:]]*=.*oef' $moduled/INDEX`
11
 test2=`grep -E '^[[:blank:]]*copyright[[:blank:]]*=.*COPYING' $moduled/INDEX`
12
 if [ -z "$test1" ] || [ -z "$test2" ]; then
13
  rm -f $w_wims_home/$w_wims_sesdir/user-deposit 2>/dev/null
14
  exit
15
 fi
16
 oefname=$moduled/src/$wims_exec_parm.oef
17
fi
18
logd=$w_wims_home/log/classes/$w_wims_class/src/images
19
sesd=$w_wims_home/$w_wims_sesdir
20
 
21
if [ -f $oefname ]; then
22
 cat $oefname >$sesd/user-deposit
23
 cat $oefname >$sesd/submit.oef
24
 if [ -d $logd/$wims_exec_parm ]; then
25
  rm -fr $sesd/getfile/oefimg 2>/dev/null
26
  mkdir -p $sesd/getfile/oefimg 2>/dev/null
27
  . $w_wims_home/bin/dircptest
28
  $dircp $logd/$wims_exec_parm/* $sesd/getfile/oefimg 2>/dev/null
29
 fi
30
 echo yes
31
else
32
 rm -f $w_wims_home/$w_wims_sesdir/user-deposit 2>/dev/null
33
fi
34