media/libnestegg/update.sh
author David Major <dmajor@mozilla.com>
Mon, 06 Mar 2017 17:52:09 +1300
changeset 396586 d5973f50d8664b9599919d13075a7a7c1e50da0d
parent 354673 84b4b7e346b8101ae63c3f7497f99bef8be66e23
child 491169 251cbf54ce917e617da41f22df75d2bf63d3fa24
permissions -rwxr-xr-x
Bug 1344615: Rewrite a few straggling users of NS_String* APIs. r=bsmedberg I've moved the body of the APIs into the few remaining callers. MozReview-Commit-ID: 9ALoSmQHkGM

# 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