1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/netwerk/sctp/update_sctp.sh Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,33 @@ 1.4 +#!/bin/bash 1.5 +# 1.6 +# This Source Code Form is subject to the terms of the Mozilla Public 1.7 +# License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 +# file, You can obtain one at http://mozilla.org/MPL/2.0/. 1.9 + 1.10 +# assume $1 is the directory with a SVN checkout of the libsctp source 1.11 +# 1.12 +# sctp usrlib source is available (via svn) at: 1.13 +# svn co https://sctp-refimpl.googlecode.com/svn/trunk sctpSVN 1.14 +# 1.15 +# also assumes we've made *NO* changes to the SCTP sources! If we do, we have to merge by 1.16 +# hand after this process, or use a more complex one. 1.17 +# 1.18 +# For example, one could update an sctp library import head, and merge back to default. Or keep a 1.19 +# separate repo with this in it, and pull from there to m-c and merge. 1.20 +if [ "$1" ] ; then 1.21 + export date=`date` 1.22 + export revision=`(cd $1; svnversion -n)` 1.23 + 1.24 + cp $1/KERN/usrsctp/usrsctplib/*.c $1/KERN/usrsctp/usrsctplib/*.h netwerk/sctp/src 1.25 + cp $1/KERN/usrsctp/usrsctplib/netinet/*.c $1/KERN/usrsctp/usrsctplib/netinet/*.h netwerk/sctp/src/netinet 1.26 + cp $1/KERN/usrsctp/usrsctplib/netinet6/*.c $1/KERN/usrsctp/usrsctplib/netinet6/*.h netwerk/sctp/src/netinet6 1.27 + 1.28 + hg addremove netwerk/sctp/src --include "**.c" --include "**.h" --similarity 90 1.29 + 1.30 + echo "sctp updated to version $revision from SVN on $date" >> netwerk/sctp/sctp_update.log 1.31 + echo "sctp updated to version $revision from SVN on $date" 1.32 + echo "WARNING: reapply any local patches!" 1.33 +else 1.34 + echo "usage: $0 path_to_sctpSVN_directory" 1.35 + echo "run from the root of your m-c clone" 1.36 +fi