import_boost.sh 966 B

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