media/libnestegg/update.sh
author Bobby Holley <bobbyholley@gmail.com>
Sat, 14 Feb 2015 19:08:15 -0800
changeset 229307 581ed2f292ff6d0fe3cdd6e0c0d0112292cf7947
parent 208089 27bcbf49cfd7de5bf9eb356069ead2eebc4747a1
child 296914 2b936bb987467f4ec7c8d7820dacf7096714da59
permissions -rwxr-xr-x
Bug 1125970 - Make flushing an opt-in mechanism, and use it only for the PDM task queues. v1 r=cpearce

# 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 -i "/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