Subversion Repositories wimsdev

Rev

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

  1. #! /bin/sh
  2. #
  3. # Recense new resources on the neighbor class.
  4. #
  5. # Output line: resource_type resource_name type
  6. # type=1: new type=2: exist but different
  7.  
  8. mdir=`pwd`
  9.  
  10. nei=$w_wims_home/log/classes/$w_nei
  11. cd $w_wims_home/log/classes/$w_wims_class
  12. cldir=`pwd`
  13. cd $nei
  14. ndir=`pwd`
  15. cd $cldir
  16.  
  17. if [ $w_itype = motd ]; then
  18.  cp $nei/.motd .
  19.  echo success
  20.  exit
  21. fi
  22.  
  23. if [ $w_itype = exo ]; then
  24.  mkdir -p src def
  25.  cp $nei/src/$w_iname src
  26.  exoroot=`echo $w_iname | sed 's/\.oef$//'`
  27.  if [ -d $nei/src/images/$exoroot ]; then
  28.   mkdir -p src/images
  29.   cp -R $nei/src/images/$exoroot src/images
  30.  fi
  31.  cd $cldir
  32.  msg=`src2def oef`
  33.  echo success
  34.  echo "$msg"
  35.  exit
  36. fi
  37.  
  38. if [ $w_itype = sheet ]; then
  39.  cp $nei/sheets/.sheet$w_iname sheets/.sheet$w_replace
  40.  echo success
  41.  exit
  42. fi
  43.  
  44. if [ $w_itype = exam ]; then
  45.  cp $nei/exams/.exam$w_iname exams/.exam$w_replace
  46.  echo success
  47.  exit
  48. fi
  49.  
  50. if [ $w_itype = glossary ]; then
  51.  cp $nei/tool/.glossary$w_iname tool/.glossary$w_replace
  52.  echo success
  53.  exit
  54. fi
  55.  
  56. if [ $w_itype = doc ]; then
  57.  rm -fR doc/c$w_replace 2>/dev/null
  58.  mkdir -p doc >/dev/null
  59.  cp -R $nei/doc/c$w_iname doc/c$w_replace
  60.  echo success
  61.  exit
  62. fi
  63.  
  64.