wl-snapshot.sh 740 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/bash -x
  2. set -e
  3. tmp=$(mktemp -d)
  4. #tmp=$(pwd)/tmp
  5. trap cleanup EXIT
  6. cleanup() {
  7. set +e
  8. [ -z "$tmp" -o ! -d "$tmp" ] || rm -rf "$tmp"
  9. }
  10. unset CDPATH
  11. pwd=$(pwd)
  12. dirname=wanderlust
  13. pkgname=wl
  14. cd "$tmp"
  15. cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/root checkout $dirname
  16. cd $dirname
  17. cat>version.el<<EOF
  18. (load-file "elmo/elmo-version.el")
  19. (princ (concat elmo-version "\n"))
  20. EOF
  21. #VERSION=$(emacs --quick --script version.el 2>/dev/null)
  22. VERSION=$(emacs --script version.el 2>/dev/null)
  23. rm -f version.el
  24. REVISION=$(date +%Y%m%d)
  25. find . -type d -name CVS -print0 | xargs -0r rm -rf
  26. cd ..
  27. mv $dirname ${pkgname}-${VERSION}
  28. tar Jcf "$pwd"/${pkgname}-${VERSION}.cvs${REVISION}.tar.xz ${pkgname}-${VERSION}
  29. cd ${pwd} >/dev/null
  30. exit