build-uploads.sh 664 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/sh
  2. #
  3. # vim: expandtab ts=2 :
  4. WEBSITE_UPLOADS='./website/_uploads'
  5. while true
  6. do
  7. test -d .git && break
  8. cd ..
  9. done
  10. set -e
  11. echo "make clean"
  12. make clean >/dev/null
  13. echo "make targz"
  14. make targz >/dev/null
  15. # Defined in the root Makefile.
  16. version="$(./offlineimap.py --version)"
  17. abbrev="$(git log --format='%h' HEAD~1..)"
  18. targz="../offlineimap-v${version}-${abbrev}.tar.gz"
  19. filename="offlineimap-v${version}.tar.gz"
  20. mv -v "$targz" "${WEBSITE_UPLOADS}/${filename}"
  21. cd "$WEBSITE_UPLOADS"
  22. for digest in sha1 sha256 sha512
  23. do
  24. target="${filename}.${digest}"
  25. echo "Adding digest ${WEBSITE_UPLOADS}/${target}"
  26. "${digest}sum" "$filename" > "$target"
  27. done