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
|
2017-03-14 20:57:03 +03:00
|
|
|
cp $1/src/cubeb_array_queue.h 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
|
2016-06-15 19:26:54 +03:00
|
|
|
cp $1/src/cubeb_jack.cpp src
|
2017-03-14 20:57:03 +03:00
|
|
|
cp $1/src/cubeb_log.cpp src
|
|
|
|
cp $1/src/cubeb_log.h src
|
|
|
|
cp $1/src/cubeb_mixer.cpp src
|
|
|
|
cp $1/src/cubeb_mixer.h src
|
2012-10-23 08:22:10 +04:00
|
|
|
cp $1/src/cubeb_opensl.c src
|
2018-02-27 14:37:49 +03:00
|
|
|
cp $1/src/cubeb-jni.cpp src
|
|
|
|
cp $1/src/cubeb-jni.h src
|
|
|
|
cp $1/src/android/cubeb-output-latency.h src/android
|
|
|
|
cp $1/src/android/cubeb_media_library.h src/android
|
2017-03-14 20:57:03 +03:00
|
|
|
cp $1/src/cubeb_osx_run_loop.h 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
|
2017-03-14 20:57:03 +03:00
|
|
|
cp $1/src/cubeb_ringbuffer.h src
|
2016-06-15 19:26:54 +03:00
|
|
|
cp $1/src/cubeb_sndio.c src
|
2017-09-01 18:39:06 +03:00
|
|
|
cp $1/src/cubeb_strings.c src
|
|
|
|
cp $1/src/cubeb_strings.h src
|
2016-06-15 19:26:54 +03:00
|
|
|
cp $1/src/cubeb_utils.h src
|
2018-03-19 18:22:26 +03:00
|
|
|
cp $1/src/cubeb_utils.cpp 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
|
2016-11-11 05:01:56 +03:00
|
|
|
cp $1/test/common.h gtest
|
|
|
|
cp $1/test/test_audio.cpp gtest
|
|
|
|
cp $1/test/test_devices.cpp gtest
|
|
|
|
cp $1/test/test_duplex.cpp gtest
|
|
|
|
cp $1/test/test_latency.cpp gtest
|
2017-12-05 21:08:20 +03:00
|
|
|
cp $1/test/test_loopback.cpp gtest
|
2017-03-14 20:57:03 +03:00
|
|
|
cp $1/test/test_overload_callback.cpp gtest
|
2016-11-11 05:01:56 +03:00
|
|
|
cp $1/test/test_record.cpp gtest
|
|
|
|
cp $1/test/test_resampler.cpp gtest
|
|
|
|
cp $1/test/test_ring_array.cpp gtest
|
|
|
|
cp $1/test/test_sanity.cpp gtest
|
|
|
|
cp $1/test/test_tone.cpp gtest
|
|
|
|
cp $1/test/test_utils.cpp gtest
|
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)
|
2017-02-27 22:53:41 +03:00
|
|
|
date=$(cd $1 && git show -s --format=%ci HEAD)
|
2012-01-13 05:38:39 +04:00
|
|
|
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
|
2017-02-27 22:53:41 +03:00
|
|
|
sed -i.bak -e "/The git commit ID used was/ s/[0-9a-f]\{40\}\(-dirty\)\{0,1\} .\{1,100\}/$version ($date)/" 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
|
2017-03-17 20:21:35 +03:00
|
|
|
|
2017-05-24 13:48:00 +03:00
|
|
|
echo "Applying disable-assert.patch on top of $rev"
|
2017-04-10 20:26:44 +03:00
|
|
|
patch -p3 < disable-assert.patch
|
2017-05-24 13:48:00 +03:00
|
|
|
|
|
|
|
echo "Applying prefer-pulse-rust.patch on top of $rev"
|
|
|
|
patch -p3 < prefer-pulse-rust.patch
|
2018-04-30 10:59:32 +03:00
|
|
|
|
|
|
|
echo "Applying disable-device-switching.patch on top of $rev"
|
|
|
|
patch -p3 < disable-device-switching.patch
|
|
|
|
|