media/libcubeb/update.sh
author Adam Roach [:abr] <adam@nostrum.com>
Thu, 04 Apr 2013 17:08:42 -0500
changeset 127790 fddde2d1e9b2df375ec4263849c32f51f1575de3
parent 126179 3446228af9dcef8c18bf03f1f93693f99aaaa2d1
child 137824 ebdf97f9ec5251696f54f076327cd88a9ed18b61
permissions -rw-r--r--
Bug 853858: Move PeerConnectionTest instance reference into global scope. r=jesup, r=hskupin

# Usage: sh update.sh <upstream_src_directory>
set -e

cp $1/include/cubeb/cubeb.h include
cp $1/src/cubeb.c src
cp $1/src/cubeb-internal.h src
cp $1/src/cubeb_alsa.c src
cp $1/src/cubeb_winmm.c src
cp $1/src/cubeb_audiounit.c src
cp $1/src/cubeb_pulse.c src
cp $1/src/cubeb_sndio.c src
cp $1/src/cubeb_opensl.c src
cp $1/src/cubeb_audiotrack.c src
cp $1/src/android/audiotrack_definitions.h src/android
cp $1/src/android/sles_definitions.h src/android
cp $1/LICENSE .
cp $1/README .
cp $1/AUTHORS .
if [ -d $1/.git ]; then
  rev=$(cd $1 && git rev-parse --verify HEAD)
  dirty=$(cd $1 && git diff-index --name-only HEAD)
fi

if [ -n "$rev" ]; then
  version=$rev
  if [ -n "$dirty" ]; then
    version=$version-dirty
    echo "WARNING: updating from a dirty git repository."
  fi
  sed -i.bak -e "/The git commit ID used was/ s/[0-9a-f]\{40\}\(-dirty\)\{0,1\}\./$version./" README_MOZILLA
  rm README_MOZILLA.bak
else
  echo "Remember to update README_MOZILLA with the version details."
fi