emacs-snapshot.sh 729 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/bash
  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. #SNAPDATE=$(date +%Y%m%d)
  12. SNAPDATE_BZR=2010-12-03 && SNAPDATE=$(echo $SNAPDATE_BZR | sed s/-//g)
  13. cd "$tmp"
  14. #bzr branch bzr://bzr.savannah.gnu.org/emacs/trunk emacs
  15. bzr branch bzr://bzr.savannah.gnu.org/emacs/trunk -r date:$SNAPDATE_BZR emacs
  16. cd emacs && eval $(autoconf configure.in | egrep '^PACKAGE_VERSION=') && cd -
  17. PKG_VER=$PACKAGE_VERSION
  18. PKG=emacs-${PKG_VER}.bzr${SNAPDATE}
  19. PKG_DIR=emacs-${PKG_VER}
  20. [ -d emacs/.bzr ] && rm -rf emacs/.bzr
  21. [ -f emacs/.bzrignore ] && rm -f emacs/.bzrignore
  22. mv emacs ${PKG_DIR}
  23. tar Jcfp ${pwd}/${PKG}.tar.xz ${PKG_DIR}
  24. cd ${pwd}
  25. exit