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-10-20 17:01:01 +03:00
|
|
|
cp $1/src/cubeb_log.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
|
|
|
|
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-11-18 19:00:47 +03:00
|
|
|
cp $1/src/cubeb_array_queue.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
|
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
|
2017-01-19 19:02:42 +03:00
|
|
|
cp $1/src/cubeb_mixer.h src
|
|
|
|
cp $1/src/cubeb_mixer.cpp 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
|
|
|
|
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
|
2017-01-19 19:02:42 +03:00
|
|
|
cp $1/test/test_mixer.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
|