update_sctp.sh 1.5 KB

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/bash
  2. #
  3. # This Source Code Form is subject to the terms of the Mozilla Public
  4. # License, v. 2.0. If a copy of the MPL was not distributed with this
  5. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  6. # assume $1 is the directory with a SVN checkout of the libsctp source
  7. #
  8. # sctp usrlib source is available (via svn) at:
  9. # svn co https://sctp-refimpl.googlecode.com/svn/trunk sctpSVN
  10. #
  11. # also assumes we've made *NO* changes to the SCTP sources! If we do, we have to merge by
  12. # hand after this process, or use a more complex one.
  13. #
  14. # For example, one could update an sctp library import head, and merge back to default. Or keep a
  15. # separate repo with this in it, and pull from there to m-c and merge.
  16. if [ "$1" ] ; then
  17. export date=`date`
  18. export revision=`(cd $1; svnversion -n)`
  19. cp $1/KERN/usrsctp/usrsctplib/*.c $1/KERN/usrsctp/usrsctplib/*.h netwerk/sctp/src
  20. cp $1/KERN/usrsctp/usrsctplib/netinet/*.c $1/KERN/usrsctp/usrsctplib/netinet/*.h netwerk/sctp/src/netinet
  21. cp $1/KERN/usrsctp/usrsctplib/netinet6/*.c $1/KERN/usrsctp/usrsctplib/netinet6/*.h netwerk/sctp/src/netinet6
  22. hg addremove netwerk/sctp/src --include "**.c" --include "**.h" --similarity 90
  23. echo "sctp updated to version $revision from SVN on $date" >> netwerk/sctp/sctp_update.log
  24. echo "sctp updated to version $revision from SVN on $date"
  25. echo "WARNING: reapply any local patches!"
  26. else
  27. echo "usage: $0 path_to_sctpSVN_directory"
  28. echo "run from the root of your m-c clone"
  29. fi