2012-01-12 17:38:39 -08:00
|
|
|
# Usage: sh update.sh <upstream_src_directory>
|
|
|
|
set -e
|
|
|
|
|
|
|
|
cp $1/include/cubeb/cubeb.h include
|
2013-03-07 20:51:59 -08:00
|
|
|
cp $1/src/cubeb.c src
|
|
|
|
cp $1/src/cubeb-internal.h src
|
2012-01-12 17:38:39 -08:00
|
|
|
cp $1/src/cubeb_alsa.c src
|
|
|
|
cp $1/src/cubeb_winmm.c src
|
|
|
|
cp $1/src/cubeb_audiounit.c src
|
2012-05-01 21:24:36 -07:00
|
|
|
cp $1/src/cubeb_pulse.c src
|
2012-06-02 00:16:32 -07:00
|
|
|
cp $1/src/cubeb_sndio.c src
|
2012-10-22 21:22:10 -07:00
|
|
|
cp $1/src/cubeb_opensl.c src
|
2013-03-13 11:36:46 -07:00
|
|
|
cp $1/src/cubeb_audiotrack.c src
|
2013-07-09 02:59:47 -07:00
|
|
|
cp $1/src/cubeb_wasapi.cpp src
|
|
|
|
cp $1/src/cubeb-speex-resampler.h src
|
2014-09-28 17:19:09 -07:00
|
|
|
cp $1/src/cubeb_panner.h src
|
|
|
|
cp $1/src/cubeb_panner.cpp src
|
2013-03-13 11:36:46 -07:00
|
|
|
cp $1/src/android/audiotrack_definitions.h src/android
|
|
|
|
cp $1/src/android/sles_definitions.h src/android
|
2012-01-12 17:38:39 -08:00
|
|
|
cp $1/LICENSE .
|
2014-09-28 17:19:09 -07:00
|
|
|
cp $1/README.md .
|
2012-01-12 17:38:39 -08:00
|
|
|
cp $1/AUTHORS .
|
2014-02-25 05:21:59 -08:00
|
|
|
cp $1/test/common.h tests/common.h
|
2014-09-28 17:19:09 -07:00
|
|
|
cp $1/test/test_audio.cpp tests/test_audio.cpp
|
|
|
|
cp $1/test/test_tone.cpp tests/test_tone.cpp
|
|
|
|
cp $1/test/test_sanity.cpp tests/test_sanity.cpp
|
|
|
|
cp $1/test/test_latency.cpp tests/test_latency.cpp
|
2014-02-25 05:21:59 -08:00
|
|
|
|
2012-01-12 17:38:39 -08:00
|
|
|
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
|
2013-03-25 15:16:31 -07:00
|
|
|
sed -i.bak -e "/The git commit ID used was/ s/[0-9a-f]\{40\}\(-dirty\)\{0,1\}\./$version./" README_MOZILLA
|
2012-01-12 17:38:39 -08:00
|
|
|
rm README_MOZILLA.bak
|
|
|
|
else
|
|
|
|
echo "Remember to update README_MOZILLA with the version details."
|
|
|
|
fi
|
|
|
|
|