media/libnestegg/update.sh
author Jean-Yves Avenard <jyavenard@mozilla.com>
Wed, 27 Apr 2016 15:44:44 +1000
changeset 356818 ccd20487bda163d7dc290458e895a609ead8f52e
parent 208091 27bcbf49cfd7de5bf9eb356069ead2eebc4747a1
permissions -rwxr-xr-x
try: -b do -p linux,linux64,linux64-asan -u mochitest-media,mochitest-media-e10s,web-platform-tests-3 -t none MozReview-Commit-ID: IGI83eNhRvw

# Usage: sh update.sh <upstream_src_directory>
cp $1/include/nestegg/nestegg.h include
cp $1/src/nestegg.c src
cp $1/halloc/halloc.h src
cp $1/halloc/src/align.h src
cp $1/halloc/src/halloc.c src
cp $1/halloc/src/hlist.h src
cp $1/halloc/src/macros.h src
cp $1/LICENSE .
cp $1/README.md .
cp $1/AUTHORS .
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
  sed -E -i .bak "/The git commit ID used was/ s/[0-9a-f]\+(-dirty)\?\./$version./" README_MOZILLA
else
  echo "Remember to update README_MOZILLA with the version details."
fi