您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

94 行
2.0KB

  1. #!/bin/sh
  2. package='tufte-latex'
  3. class='tufte-handout.cls'
  4. # Exit on first error:
  5. set -e
  6. # Verify prerequisites:
  7. if test $# -ne 1
  8. then
  9. echo "Usage: $0 VERSION"
  10. exit 1
  11. fi
  12. version=$1
  13. if ! echo $version | grep -E "^[0-9]+\.[0-9]+\.[0-9]+$"
  14. then
  15. echo "VERSION should be of the form 1.2.5 (major.minor.revision)"
  16. exit 1
  17. fi
  18. if ! grep -q $version $class
  19. then
  20. echo "Error: version skew. '$version' does not match that in class"
  21. grep -H ProvidesClass $class
  22. exit 1
  23. fi
  24. if ! grep -q $version History.txt
  25. then
  26. echo "Error: no release notes for '$version' found in History.txt"
  27. grep -H $version History.txt
  28. exit 1
  29. fi
  30. class_date=`date +%Y/%m/%d` # (with slashes)
  31. if ! grep -q $class_date $class
  32. then
  33. echo "Error: date skew. '$class_date' does not match that in class"
  34. grep -H ProvidesClass $class
  35. exit 1
  36. fi
  37. history_date=`date +%Y-%m-%d` # (with dashes)
  38. if ! grep -q $history_date History.txt
  39. then
  40. echo "Error: '$history_date' not found in History.txt"
  41. grep -H $history_date History.txt
  42. exit 1
  43. fi
  44. # Refresh sample document
  45. pdflatex sample-handout > refresh-sample.log
  46. bibtex sample-handout >> refresh-sample.log
  47. pdflatex sample-handout >> refresh-sample.log
  48. pdflatex sample-handout >> refresh-sample.log
  49. rm -f sample-handout.{aux,log,out,blg,bbl} refresh-sample.log
  50. # To ease googlecode upload, make a distinct version of sample-handout:
  51. cp sample-handout.pdf sample-handout-$version.pdf
  52. # Make bundle
  53. mkdir -p pkg/$package-$version
  54. tar cf - `cat Manifest.txt` | ( cd pkg/$package-$version && tar xf - )
  55. zip -rq pkg/$package-$version.zip pkg/$package-$version
  56. # Provide some cut-n-paste material for manual steps:
  57. cat << MESSAGE
  58. `openssl dgst -sha1 pkg/$package-$version.zip`
  59. Don't forget to create an SVN tag (after committing changes),
  60. svn cp -m'To tag release $version.' \\
  61. https://$package.googlecode.com/svn/trunk \\
  62. https://$package.googlecode.com/svn/tags/rel_$version
  63. and upload the zip file,
  64. http://code.google.com/p/$package/downloads/list
  65. http://ctan.org/upload
  66. MESSAGE