media/libcubeb/update.sh

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 # Usage: sh update.sh <upstream_src_directory>
     2 set -e
     4 cp $1/include/cubeb/cubeb.h include
     5 cp $1/src/cubeb.c src
     6 cp $1/src/cubeb-internal.h src
     7 cp $1/src/cubeb_alsa.c src
     8 cp $1/src/cubeb_winmm.c src
     9 cp $1/src/cubeb_audiounit.c src
    10 cp $1/src/cubeb_pulse.c src
    11 cp $1/src/cubeb_sndio.c src
    12 cp $1/src/cubeb_opensl.c src
    13 cp $1/src/cubeb_audiotrack.c src
    14 cp $1/src/cubeb_wasapi.cpp src
    15 cp $1/src/cubeb-speex-resampler.h src
    16 cp $1/src/android/audiotrack_definitions.h src/android
    17 cp $1/src/android/sles_definitions.h src/android
    18 cp $1/LICENSE .
    19 cp $1/README .
    20 cp $1/AUTHORS .
    21 cp $1/test/common.h tests/common.h
    22 cp $1/test/test_audio.c tests/test_audio.cpp
    23 cp $1/test/test_tone.c tests/test_tone.cpp
    24 cp $1/test/test_sanity.c tests/test_sanity.cpp
    25 cp $1/test/test_latency.c tests/test_latency.cpp
    27 if [ -d $1/.git ]; then
    28   rev=$(cd $1 && git rev-parse --verify HEAD)
    29   dirty=$(cd $1 && git diff-index --name-only HEAD)
    30 fi
    32 if [ -n "$rev" ]; then
    33   version=$rev
    34   if [ -n "$dirty" ]; then
    35     version=$version-dirty
    36     echo "WARNING: updating from a dirty git repository."
    37   fi
    38   sed -i.bak -e "/The git commit ID used was/ s/[0-9a-f]\{40\}\(-dirty\)\{0,1\}\./$version./" README_MOZILLA
    39   rm README_MOZILLA.bak
    40 else
    41   echo "Remember to update README_MOZILLA with the version details."
    42 fi

mercurial