media/libcubeb/update.sh
author B2G Bumper Bot <release+b2gbumper@mozilla.com>
Thu, 03 Jul 2014 08:56:28 -0700
changeset 228668 13aa5be377b0f61dc598d57e38f09736409342be
parent 176703 3aa0b31ea0ab42602e42cb3cf6631c119e6bb359
child 211884 1037bad284805e0b4a7d54cfdd6358f17ff140a5
permissions -rw-r--r--
Bumping manifests a=b2g-bump

# 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/cubeb_wasapi.cpp src
cp $1/src/cubeb-speex-resampler.h 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 .
cp $1/test/common.h tests/common.h
cp $1/test/test_audio.c tests/test_audio.cpp
cp $1/test/test_tone.c tests/test_tone.cpp
cp $1/test/test_sanity.c tests/test_sanity.cpp
cp $1/test/test_latency.c tests/test_latency.cpp

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