Source code

Revision control

Other Tools

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
7
# assume $1 is the directory with a checkout of the libsctp source
8
#
9
# sctp usrlib source was available (via svn) at:
11
# now available via git:
13
#
14
# also assumes we've made *NO* changes to the SCTP sources! If we do, we have to merge by
15
# hand after this process, or use a more complex one.
16
#
17
# For example, one could update an sctp library import head, and merge back to default. Or keep a
18
# separate repo with this in it, and pull from there to m-c and merge.
19
if [ "$1" ] ; then
20
export date=`date`
21
export revision=`(cd $1; git rev-parse HEAD)`
22
23
cp $1/usrsctplib/*.c $1/usrsctplib/*.h netwerk/sctp/src
24
cp $1/usrsctplib/netinet/*.c $1/usrsctplib/netinet/*.h netwerk/sctp/src/netinet
25
cp $1/usrsctplib/netinet6/*.c $1/usrsctplib/netinet6/*.h netwerk/sctp/src/netinet6
26
27
hg addremove netwerk/sctp/src --include "**.c" --include "**.h" --similarity 90
28
29
echo "sctp updated to version $revision from git on $date" >> netwerk/sctp/sctp_update.log
30
echo "sctp updated to version $revision from git on $date"
31
echo "reapplying local patches:"
32
patch -p1 < netwerk/sctp/android.patch
33
else
34
echo "usage: $0 path_to_sctp_directory"
35
echo "run from the root of your m-c clone"
36
echo "example: sh netwerk/sctp/update.sh ../../sctp"
37
fi