src-release.sh 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. #!/bin/sh
  2. ###################################################################
  3. # ODE Source Code Release Script
  4. # Originally written by Jason Perkins ([email protected])
  5. #
  6. # See README.txt in this directory for complete release
  7. # instructions before running this script.
  8. #
  9. # Prerequisites:
  10. # Command-line svn installed on path
  11. # Command-line zip installed on path
  12. # Command-line doxygen installed on path
  13. # Autotools support installed
  14. # Run from a Posix-like shell (Linux, OS X, Cygwin)
  15. ###################################################################
  16. # Check arguments
  17. if [ $# -ne 1 ]; then
  18. echo 1>&2 "Usage: $0 version_number"
  19. exit 1
  20. fi
  21. ###################################################################
  22. # Pre-build checklist
  23. ###################################################################
  24. echo ""
  25. echo "STARTING PREBUILD CHECKLIST, PRESS ^C TO ABORT."
  26. echo ""
  27. echo "Is the version number '$1' correct?"
  28. read line
  29. echo ""
  30. echo "Have you created a release branch named '$1' in SVN?"
  31. read line
  32. echo ""
  33. echo Are 'svn', 'zip', and 'doxygen' on the path?
  34. read line
  35. echo ""
  36. echo "Okay, ready to build the source code package for version $1!"
  37. read line
  38. ###################################################################
  39. # Retrieve source code
  40. ###################################################################
  41. echo ""
  42. echo "RETRIEVING SOURCE CODE FROM REPOSITORY..."
  43. echo ""
  44. svn export https://opende.svn.sourceforge.net/svnroot/opende/branches/$1 ode-$1
  45. ###################################################################
  46. # Prepare source code
  47. ###################################################################
  48. echo ""
  49. echo "PREPARING SOURCE TREE..."
  50. echo ""
  51. cd ode-$1
  52. chmod 755 autogen.sh
  53. ./autogen.sh
  54. rm -rf autom4te.cache
  55. cp build/config-default.h include/ode/config.h
  56. cd ode/doc
  57. doxygen
  58. cd ../../..
  59. ###################################################################
  60. # Package source code
  61. ###################################################################
  62. echo ""
  63. echo "PACKAGING SOURCE CODE..."
  64. echo ""
  65. zip -r9 ode-src-$1.zip ode-$1/*
  66. ###################################################################
  67. # Clean up
  68. ###################################################################
  69. echo ""
  70. echo "CLEANING UP..."
  71. echo ""
  72. rm -rf ode-$1
  73. #####################################################################
  74. # Send the files to SourceForge
  75. #####################################################################
  76. echo ""
  77. echo "Upload packages to SourceForge?"
  78. read line
  79. if [ $line = "y" ]; then
  80. echo "Uploading to SourceForge..."
  81. echo "user anonymous starkos" > ftp.txt
  82. echo "cd incoming" >> ftp.txt
  83. echo "bin" >> ftp.txt
  84. echo "put ode-src-$1.zip" >> ftp.txt
  85. echo "quit" >> ftp.txt
  86. ftp -n upload.sourceforge.net < ftp.txt
  87. rm -f ftp.txt
  88. fi