makesrcdist 1010 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #!/bin/sh
  2. #
  3. # "$Id: makesrcdist 150 2009-04-10 07:52:29Z mike $"
  4. #
  5. # makesrcdist - make a source distribution of newsd.
  6. #
  7. echo "Getting distribution..."
  8. if test $# = 0; then
  9. echo -n "Version number for distribution? "
  10. read version
  11. else
  12. version=$1
  13. fi
  14. cd /tmp
  15. if test $version = snapshot; then
  16. url="https://svn.easysw.com/public/newsd/trunk"
  17. else
  18. url="https://svn.easysw.com/public/newsd/tags/release-$version"
  19. svn copy https://svn.easysw.com/public/newsd/trunk/ "$url" \
  20. -m "Tag $version" || exit 1
  21. fi
  22. rm -rf newsd-$version
  23. svn export $url newsd-$version
  24. cd newsd-$version
  25. echo "Removing Subversion files and directories..."
  26. rm -rf www
  27. rm -f makesrcdist
  28. cd ..
  29. echo "Making .tar.gz distribution..."
  30. gtar czf newsd-$version-source.tar.gz newsd-$version
  31. echo "Making .tar.bz2 distribution..."
  32. gtar cjf newsd-$version-source.tar.bz2 newsd-$version
  33. echo "Removing distribution directory..."
  34. rm -rf newsd-$version
  35. echo "Done!"
  36. #
  37. # End of "$Id: makesrcdist 150 2009-04-10 07:52:29Z mike $".
  38. #