make_package.sh 682 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/usr/bin/env bash
  2. #Paul Klumpp 2012-11-19
  3. ver=1.1
  4. cwd=$(pwd)
  5. q2dir=$cwd/../q2srv/
  6. pkg_dir=$cwd/../
  7. # clean q2compile
  8. gits="aq2-tng q2admin q2a_mvd gs_starter q2pro"
  9. for s in $gits; do
  10. if [ -d "${s}" ]; then
  11. rm -rf "$s"
  12. fi
  13. done
  14. # q2dir cleanup
  15. cd $q2dir
  16. rm -vf q2proded 2> /dev/null
  17. rm -vf gs_starter.sh
  18. rm -vf gs*sh
  19. rm -vf action/game*.so
  20. rm -vrf plugins
  21. # editor backup cleanup
  22. cd $pkg_dir
  23. fuppa=$(find -type f -iname *~)
  24. for x in $fuppa; do
  25. rm -v "$x"
  26. done
  27. # building package
  28. # tar
  29. cd $pkg_dir/../
  30. rm -vf aq2-basesrv-pkg-$ver.tgz
  31. tar --exclude-vcs -cvf - aq2-basesrv/ | gzip -9 - > aq2-basesrv-pkg-$ver.tgz
  32. cp -v aq2-basesrv-pkg-$ver.tgz aq2-basesrv-pkg-latest.tgz