import_boost.sh 1.0 KB

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