import_boost.sh 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #!/bin/sh
  2. # given a directory, copy all needed parts from boost into the
  3. # current branch
  4. # usage example:
  5. # cd /tmp
  6. # tar xzvf /location/of/boost/tarball
  7. # cd /home/user/svn/bind10/trunk
  8. # tools/import_boost.sh /tmp/boost-version
  9. # svn commit
  10. # need new boost stuff?
  11. # add files to list 'ere
  12. FILES="
  13. boost/assert.hpp
  14. boost/call_traits.hpp
  15. boost/checked_delete.hpp
  16. boost/config
  17. boost/config.hpp
  18. boost/current_function.hpp
  19. boost/detail/*.hpp
  20. boost/exception
  21. boost/integer_traits.hpp
  22. boost/lexical_cast.hpp
  23. boost/limits.hpp
  24. boost/memory_order.hpp
  25. boost/mpl
  26. boost/preprocessor
  27. boost/shared_ptr.hpp
  28. boost/smart_ptr
  29. boost/smart_ptr.hpp
  30. boost/static_assert.hpp
  31. boost/throw_exception.hpp
  32. boost/type_traits
  33. "
  34. TARGET="ext"
  35. if [ $# -ne 1 ]
  36. then
  37. echo "Usage: boost_import.sh <boost directory>"
  38. exit
  39. fi
  40. if [ ! -d $TARGET/boost ]
  41. then
  42. echo "This does not appear to be the main trunk/branch directory"
  43. exit
  44. fi
  45. DIR=$1
  46. do_cmd()
  47. {
  48. echo $@
  49. $@
  50. }
  51. #echo "cp ${DIR}/boost/shared_ptr.hpp boost/"
  52. for FILE in ${FILES}
  53. do
  54. TGT=`echo ${FILE} | sed 's/[^\/]*$//'`
  55. cmd="mkdir -p ${TARGET}/${TGT}"
  56. do_cmd ${cmd}
  57. cmd="cp -r ${DIR}/${FILE} ${TARGET}/${TGT}"
  58. do_cmd ${cmd}
  59. done