Subversion Repositories wimsdev

Rev

Rev 2441 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  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.   cp -pPR $logd/$wims_exec_parm/* $sesd/getfile/oefimg 2>/dev/null
  28.  fi
  29.  echo yes
  30. else
  31.  rm -f $w_wims_home/$w_wims_sesdir/user-deposit 2>/dev/null
  32. fi
  33.  
  34.