build_package.sh 561 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #! /bin/bash
  2. if [ $# -eq 1 ]
  3. then
  4. rep=$(pwd)/../a2ri-$1
  5. mkdir $rep
  6. cp -r * $rep/
  7. rm $rep/build_package.sh
  8. rm -rf $rep/CVS
  9. rm -rf $rep/*/CVS
  10. rm -rf $rep/*/*/CVS
  11. rm -rf $rep/*/*/*/CVS
  12. rm -rf $rep/*/*/*/*/CVS
  13. rm -rf $rep/*/*/*/*/*/CVS
  14. rm -rf $rep/*/*/*/*/*/*/CVS
  15. rm -rf $rep/*/*/*/*/*/*/*/CVS
  16. rm -rf $rep/*/*/*/*/*/*/*/*/CVS
  17. cd $rep
  18. make clean
  19. exemples=$(ls examples)
  20. for i in $exemples
  21. do
  22. if [ "$i$" != "CVS" ]
  23. then
  24. cd $rep/examples/$i
  25. make clean
  26. fi
  27. done
  28. cd $rep/../
  29. tar czvf a2ri-$1.tar.gz a2ri-$1
  30. zip -r a2ri-$1.zip a2ri-$1
  31. rm -rf $rep
  32. fi