update_boost.sh 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/usr/bin/env bash
  2. # This script is used to update cpp/BoostParts to the latest boost version
  3. # Give it the full path to the boost_1_XX_X folder
  4. # Exit if error
  5. set -e
  6. if [ -z "$1" ]; then
  7. echo "Usage: $0 /path/to/boost_1_XX_X"
  8. exit 0
  9. fi
  10. pushd $1
  11. ./bootstrap.sh
  12. b2 tools/bcp
  13. boost_part_dir=`mktemp -d -t boost_parts.XXXXXX`
  14. dist/bin/bcp boost/utility.hpp boost/python.hpp boost/bind.hpp boost/lambda/lambda.hpp boost/exception/all.hpp boost/tuple/tuple_io.hpp boost/tuple/tuple_comparison.hpp boost/regex.hpp boost/foreach.hpp boost/smart_ptr.hpp boost/algorithm/string_regex.hpp boost/thread.hpp boost/unordered_map.hpp boost/unordered_set.hpp boost/format.hpp boost/ptr_container/ptr_container.hpp boost/filesystem.hpp boost/filesystem/fstream.hpp boost/utility.hpp boost/algorithm/cxx11/any_of.hpp atomic lockfree assign $boost_part_dir
  15. pushd $boost_part_dir
  16. # DON'T exit if error
  17. set +e
  18. find libs \( -name assign -o -name mpi -o -name config -o -name lockfree \) -exec rm -rf '{}' \;
  19. find libs \( -name doc -o -name test -o -name examples -o -name build \) -exec rm -rf '{}' \;
  20. find libs -not \( -name "*.hpp" -o -name "*.cpp" -o -name "*.ipp" -o -name "*.inl" \) -type f -delete
  21. # Exit if error
  22. set -e
  23. popd
  24. popd
  25. rm -rf cpp/BoostParts/libs
  26. rm -rf cpp/BoostParts/boost
  27. cp -R $boost_part_dir/libs cpp/BoostParts/libs
  28. cp -R $boost_part_dir/boost cpp/BoostParts/boost
  29. rm -rf $boost_part_dir