snapshot_posix.sh 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #!/usr/bin/env bash
  2. # Build a branches/release snapshot for Posix, using LF line termination
  3. # © Copyright 2008 Beman Dawes
  4. # Distributed under the Boost Software License, Version 1.0.
  5. # See http://www.boost.org/LICENSE_1_0.txt
  6. echo "Build a branches/release snapshot for POSIX, using LF line termination..."
  7. echo "Removing old files..."
  8. rm -r -f posix
  9. rm -r -f svn_info
  10. echo "Exporting files from subversion..."
  11. # leave an audit trail, which is used by inspect to determine revision number
  12. # use --non-recursive rather than --depth=files until the linux distros catch up
  13. svn co --non-recursive http://svn.boost.org/svn/boost/branches/release svn_info
  14. svn export --non-interactive --native-eol LF http://svn.boost.org/svn/boost/branches/release posix
  15. echo "Building docs..."
  16. pushd posix/doc
  17. bjam --v2 --toolset=gcc &>../../posix-bjam.log
  18. popd
  19. echo "Cleaning up and renaming..."
  20. rm -r posix/bin.v2
  21. SNAPSHOT_DATE=`eval date +%Y-%m-%d`
  22. echo SNAPSHOT_DATE is $SNAPSHOT_DATE
  23. mv posix boost-posix-$SNAPSHOT_DATE
  24. rm -f posix.tar.gz
  25. rm -f posix.tar.bz2
  26. echo "Building .gz file..."
  27. tar cfz posix.tar.gz boost-posix-$SNAPSHOT_DATE
  28. echo "Building .bz2 file..."
  29. gunzip -c posix.tar.gz | bzip2 >posix.tar.bz2
  30. mv boost-posix-$SNAPSHOT_DATE posix
  31. echo "Creating ftp script..."
  32. echo "dir" >posix.ftp
  33. echo "binary" >>posix.ftp
  34. #echo "put posix.tar.gz" >>posix.ftp
  35. #echo "mdelete boost-posix*.gz" >>posix.ftp
  36. #echo "rename posix.tar.gz boost-posix-$SNAPSHOT_DATE.tar.gz" >>posix.ftp
  37. echo "put posix.tar.bz2" >>posix.ftp
  38. echo "mdelete boost-posix*.bz2" >>posix.ftp
  39. echo "rename posix.tar.bz2 boost-posix-$SNAPSHOT_DATE.tar.bz2" >>posix.ftp
  40. echo "dir" >>posix.ftp
  41. echo "bye" >>posix.ftp
  42. echo "Running ftp script..."
  43. # use cygwin ftp rather than Windows ftp
  44. /usr/bin/ftp -v -i boost.cowic.de <posix.ftp
  45. echo "POSIX snapshot complete!
粤ICP备19079148号