import_boost.sh 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #!/bin/sh
  2. # given a directory, copy all needed parts from boost into the
  3. # current branch
  4. # only run this to update boost! (i.e. almost never)
  5. # usage example:
  6. # cd /tmp
  7. # tar xzvf /location/of/boost/tarball
  8. # cd /home/user/svn/bind10/trunk
  9. # tools/import_boost.sh /tmp/boost-version
  10. # svn commit
  11. # need new boost stuff?
  12. # TODO: LICENSE_1_0.txt
  13. # add files to list 'ere
  14. FILES="
  15. boost/*.hpp
  16. boost/algorithm
  17. boost/asio
  18. boost/assign/list_inserter.hpp
  19. boost/assign/std/vector.hpp
  20. boost/bind
  21. boost/config
  22. boost/concept
  23. boost/detail
  24. boost/exception
  25. boost/function
  26. boost/iterator
  27. boost/mpl
  28. boost/preprocessor
  29. boost/range
  30. boost/smart_ptr
  31. boost/type_traits
  32. boost/utility
  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