publish.sh 748 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #!/bin/sh
  2. if [ -z $MAKE ]
  3. then
  4. MAKE=make
  5. fi
  6. ROOT=`pwd`
  7. FILES=""
  8. # CM
  9. CMS=`find . -name "CM*" -type d -prune`
  10. for cm in $CMS
  11. do
  12. cd $ROOT/$cm
  13. $MAKE
  14. touch *.tex # force recompiling (latex toc)
  15. $MAKE
  16. FILES="$FILES $cm/`ls *.pdf`"
  17. done
  18. cd $ROOT
  19. # TP
  20. TPS=`find . -name "template_*" -type d -prune`
  21. for tp in $TPS
  22. do
  23. # pdf
  24. cd $ROOT/$tp
  25. $MAKE
  26. touch *.tex # force recompiling (latex toc)
  27. $MAKE
  28. $MAKE clean
  29. FILES="$FILES $tp/`ls *.pdf`"
  30. # code
  31. cd $ROOT
  32. tar zcf ${tp}.tar.gz ${tp}
  33. FILES="$FILES ${tp}.tar.gz"
  34. done
  35. cd $ROOT
  36. # www
  37. $MAKE -C www
  38. FILES=" $FILES ./www/index.html "
  39. # upload files
  40. echo $FILES
  41. scp $FILES yangra.univ-littoral.fr:public-html/enseignements/L3Info_Projets/