You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

65 lines
1.3 KiB

  1. #!/bin/sh
  2. # only builds snapshots for now
  3. # tarball name contains date and git short id
  4. SRCTEST=src/main/lighttpd_worker.c
  5. PACKAGE=lighttpd
  6. REV=${REV}
  7. BASEDOWNLOADURL="http://download.lighttpd.net/lighttpd/snapshots-2.0.x"
  8. if [ ! -f ${SRCTEST} ]; then
  9. echo "Current directory is not the source directory"
  10. exit 1
  11. fi
  12. dopack=1
  13. if [ "$1" = "--nopack" ]; then
  14. dopack=0
  15. shift
  16. fi
  17. append="$1"
  18. function force() {
  19. "$@" || {
  20. echo "Command failed: $*"
  21. exit 1
  22. }
  23. }
  24. if [ ${dopack} = "1" ]; then
  25. force ./autogen.sh
  26. if [ -d distbuild ]; then
  27. # make distcheck may leave readonly files
  28. chmod u+w -R distbuild
  29. rm -rf distbuild
  30. fi
  31. force mkdir distbuild
  32. force cd distbuild
  33. force ../configure --prefix=/usr
  34. # force make
  35. # force make check
  36. force make distcheck
  37. else
  38. force cd distbuild
  39. fi
  40. version=`./config.status -V | head -n 1 | cut -d' ' -f3`
  41. name="${PACKAGE}-${version}"
  42. append="-snap-$(date '+%Y%m%d')${REV}-g$(git rev-list --abbrev-commit --abbrev=6 HEAD^..HEAD)"
  43. if [ -n "${append}" ]; then
  44. cp "${name}.tar.gz" "${name}${append}.tar.gz"
  45. cp "${name}.tar.bz2" "${name}${append}.tar.bz2"
  46. name="${name}${append}"
  47. fi
  48. force sha256sum "${name}.tar."{gz,bz2} > "${name}.sha256sum"
  49. echo wget "${BASEDOWNLOADURL}/${name}".'{tar.gz,tar.bz2,sha256sum}; sha256sum -c '${name}'.sha256sum'