wl-snapshot.sh 674 B

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