2012-01-13 05:38:39 +04:00
|
|
|
# Usage: sh update.sh <upstream_src_directory>
|
|
|
|
set -e
|
|
|
|
|
2016-06-15 19:26:54 +03:00
|
|
|
cp $1/AUTHORS .
|
|
|
|
cp $1/LICENSE .
|
|
|
|
cp $1/README.md .
|
2012-01-13 05:38:39 +04:00
|
|
|
cp $1/include/cubeb/cubeb.h include
|
2016-06-15 19:26:54 +03:00
|
|
|
cp $1/src/android/audiotrack_definitions.h src/android
|
|
|
|
cp $1/src/android/sles_definitions.h src/android
|
2013-03-08 08:51:59 +04:00
|
|
|
cp $1/src/cubeb-internal.h src
|
2016-06-15 19:26:54 +03:00
|
|
|
cp $1/src/cubeb-speex-resampler.h src
|
|
|
|
cp $1/src/cubeb.c src
|
2012-01-13 05:38:39 +04:00
|
|
|
cp $1/src/cubeb_alsa.c src
|
2016-06-15 19:26:54 +03:00
|
|
|
cp $1/src/cubeb_audiotrack.c src
|
2016-07-20 16:02:23 +03:00
|
|
|
cp $1/src/cubeb_audiounit.cpp src
|
|
|
|
cp $1/src/cubeb_osx_run_loop.h src
|
2016-06-15 19:26:54 +03:00
|
|
|
cp $1/src/cubeb_jack.cpp src
|
2012-10-23 08:22:10 +04:00
|
|
|
cp $1/src/cubeb_opensl.c src
|
2016-06-15 19:26:54 +03:00
|
|
|
cp $1/src/cubeb_panner.cpp src
|
|
|
|
cp $1/src/cubeb_panner.h src
|
|
|
|
cp $1/src/cubeb_pulse.c src
|
|
|
|
cp $1/src/cubeb_resampler.cpp src
|
2016-01-22 06:17:46 +03:00
|
|
|
cp $1/src/cubeb_resampler.h src
|
2016-03-25 19:43:02 +03:00
|
|
|
cp $1/src/cubeb_resampler_internal.h src
|
|
|
|
cp $1/src/cubeb_ring_array.h src
|
2016-06-15 19:26:54 +03:00
|
|
|
cp $1/src/cubeb_sndio.c src
|
|
|
|
cp $1/src/cubeb_utils.h src
|
2016-07-29 14:40:52 +03:00
|
|
|
cp $1/src/cubeb_utils_unix.h src
|
|
|
|
cp $1/src/cubeb_utils_win.h src
|
2016-06-15 19:26:54 +03:00
|
|
|
cp $1/src/cubeb_wasapi.cpp src
|
|
|
|
cp $1/src/cubeb_winmm.c src
|
2014-02-25 17:21:59 +04:00
|
|
|
cp $1/test/common.h tests/common.h
|
2014-09-29 04:19:09 +04:00
|
|
|
cp $1/test/test_audio.cpp tests/test_audio.cpp
|
2016-06-15 19:26:54 +03:00
|
|
|
#cp $1/test/test_devices.c tests/test_devices.cpp
|
2016-03-25 19:43:02 +03:00
|
|
|
cp $1/test/test_duplex.cpp tests/test_duplex.cpp
|
2016-06-15 19:26:54 +03:00
|
|
|
cp $1/test/test_latency.cpp tests/test_latency.cpp
|
2016-03-25 19:43:02 +03:00
|
|
|
cp $1/test/test_record.cpp tests/test_record.cpp
|
2016-06-15 19:26:54 +03:00
|
|
|
cp $1/test/test_resampler.cpp tests/test_resampler.cpp
|
|
|
|
cp $1/test/test_sanity.cpp tests/test_sanity.cpp
|
|
|
|
cp $1/test/test_tone.cpp tests/test_tone.cpp
|
2016-03-25 19:43:02 +03:00
|
|
|
cp $1/test/test_utils.cpp tests/test_utils.cpp
|
2014-02-25 17:21:59 +04:00
|
|
|
|
2012-01-13 05:38:39 +04: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-26 02:16:31 +04:00
|
|
|
sed -i.bak -e "/The git commit ID used was/ s/[0-9a-f]\{40\}\(-dirty\)\{0,1\}\./$version./" README_MOZILLA
|
2012-01-13 05:38:39 +04:00
|
|
|
rm README_MOZILLA.bak
|
|
|
|
else
|
|
|
|
echo "Remember to update README_MOZILLA with the version details."
|
|
|
|
fi
|
|
|
|
|
2016-10-03 11:08:26 +03:00
|
|
|
echo "Applying a patch on top of $version"
|
|
|
|
patch -p1 < ./wasapi-drift.patch
|
2016-10-05 13:20:06 +03:00
|
|
|
echo "Applying another patch on top of $version"
|
|
|
|
patch -p1 < ./wasapi-stereo-mic.patch
|
2016-10-19 04:42:03 +03:00
|
|
|
echo "Applying another patch on top of $version"
|
|
|
|
patch -p1 < ./bug1308418-mutex-copy-ctor.patch
|