media/libnestegg/update.sh
author Dustin J. Mitchell <dustin@mozilla.com>
Sun, 05 Feb 2017 14:08:10 -0500
changeset 358084 b1e27dba755b4ca2c26565f0b2849a3c3b1bd7fa
parent 311170 84b4b7e346b8101ae63c3f7497f99bef8be66e23
child 433417 251cbf54ce917e617da41f22df75d2bf63d3fa24
permissions -rwxr-xr-x
Bug 1340564: use an attribute to identify signed tasks; r=Callek This is a more robust approach than using substring matching on task labels. As an optimization, this simply avoids creating balrog tasks for unsigned beets using only-for-attributes, rather than omitting them in a transform. MozReview-Commit-ID: 8MNOxu0WgXo

# Usage: sh update.sh <upstream_src_directory>
cp $1/include/nestegg/nestegg.h include
cp $1/src/nestegg.c 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