import_boost.sh 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. # add files to list 'ere
  13. FILES="
  14. boost/*.hpp
  15. boost/algorithm
  16. boost/asio
  17. boost/bind
  18. boost/config
  19. boost/concept
  20. boost/detail
  21. boost/exception
  22. boost/function
  23. boost/iterator
  24. boost/mpl
  25. boost/preprocessor
  26. boost/range
  27. boost/smart_ptr
  28. boost/type_traits
  29. boost/utility
  30. "
  31. TARGET="ext"
  32. if [ $# -ne 1 ]
  33. then
  34. echo "Usage: boost_import.sh <boost directory>"
  35. exit
  36. fi
  37. if [ ! -d $TARGET/boost ]
  38. then
  39. echo "This does not appear to be the main trunk/branch directory"
  40. exit
  41. fi
  42. DIR=$1
  43. do_cmd()
  44. {
  45. echo $@
  46. $@
  47. }
  48. #echo "cp ${DIR}/boost/shared_ptr.hpp boost/"
  49. for FILE in ${FILES}
  50. do
  51. TGT=`echo ${FILE} | sed 's/[^\/]*$//'`
  52. cmd="mkdir -p ${TARGET}/${TGT}"
  53. do_cmd ${cmd}
  54. cmd="cp -r ${DIR}/${FILE} ${TARGET}/${TGT}"
  55. do_cmd ${cmd}
  56. done