media/libnestegg/update.sh

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/media/libnestegg/update.sh	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,27 @@
     1.4 +# Usage: sh update.sh <upstream_src_directory>
     1.5 +cp $1/include/nestegg/nestegg.h include
     1.6 +cp $1/src/nestegg.c src
     1.7 +cp $1/halloc/halloc.h src
     1.8 +cp $1/halloc/src/align.h src
     1.9 +cp $1/halloc/src/halloc.c src
    1.10 +cp $1/halloc/src/hlist.h src
    1.11 +cp $1/halloc/src/macros.h src
    1.12 +cp $1/LICENSE .
    1.13 +cp $1/README .
    1.14 +cp $1/AUTHORS .
    1.15 +if [ -d $1/.git ]; then
    1.16 +  rev=$(cd $1 && git rev-parse --verify HEAD)
    1.17 +  dirty=$(cd $1 && git diff-index --name-only HEAD)
    1.18 +fi
    1.19 +
    1.20 +if [ -n "$rev" ]; then
    1.21 +  version=$rev
    1.22 +  if [ -n "$dirty" ]; then
    1.23 +    version=$version-dirty
    1.24 +    echo "WARNING: updating from a dirty git repository."
    1.25 +  fi
    1.26 +  sed -i "/The git commit ID used was/ s/[0-9a-f]\+\(-dirty\)\?\./$version./" README_MOZILLA
    1.27 +else
    1.28 +  echo "Remember to update README_MOZILLA with the version details."
    1.29 +fi
    1.30 +

mercurial