netwerk/srtp/update_srtp.sh
author Nicolas Chevobbe <nchevobbe@mozilla.com>
Thu, 04 Jan 2018 12:35:06 +0100
changeset 397774 8a3eb4701abaf310c6347ffbedc2a20552ed844c
parent 393515 3ad217d737b36f3f8a029bc14c706ce79b995b9e
child 436205 c8eec40da8fd776ef48f185378ab8c2a54fcaadd
permissions -rw-r--r--
Bug 1404368 - Enable browser_webconsole_document_focus.js in new frontend;r=jdescottes. MozReview-Commit-ID: Fd9p0oigRpB

#!/bin/bash
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

# assume $1 is the directory with a git checkout of the libsrtp source
#
# srtp source is available at: https://github.com/cisco/libsrtp/
#
# also assumes we've made *NO* changes to the SRTP sources!  If we do, we have to merge by
# hand after this process, or use a more complex one.
#
# For example, one could update an srtp library import head, and merge back to default.  Or keep a
# separate repo with this in it, and pull from there to m-c and merge.
if [ "$1" ] ; then
  DATE=`date`
  REVISION=`(cd $1; git log --pretty=oneline | head -1 | cut -c 1-40)`
  cp -rf $1/srtp $1/crypto $1/include $1/test $1/VERSION $1/LICENSE $1/README.md netwerk/srtp/src

  hg addremove netwerk/srtp/src --include "netwerk/srtp/src/VERSION" --include "netwerk/srtp/src/LICENSE" --include "netwerk/srtp/src/README.md" --include "**.c" --include "**.h" --similarity 90

  echo "srtp updated to revision $REVISION from git on $DATE" >> netwerk/srtp/srtp_update.log
  echo "srtp updated to revision $REVISION from git on $DATE"
  echo "WARNING: reapply any local patches!"
else
  echo "usage: $0 path_to_srtp_directory"
  echo "run from the root of your m-c clone"
fi