michael@0: # Usage: sh update.sh michael@0: cp $1/include/nestegg/nestegg.h include michael@0: cp $1/src/nestegg.c src michael@0: cp $1/halloc/halloc.h src michael@0: cp $1/halloc/src/align.h src michael@0: cp $1/halloc/src/halloc.c src michael@0: cp $1/halloc/src/hlist.h src michael@0: cp $1/halloc/src/macros.h src michael@0: cp $1/LICENSE . michael@0: cp $1/README . michael@0: cp $1/AUTHORS . michael@0: if [ -d $1/.git ]; then michael@0: rev=$(cd $1 && git rev-parse --verify HEAD) michael@0: dirty=$(cd $1 && git diff-index --name-only HEAD) michael@0: fi michael@0: michael@0: if [ -n "$rev" ]; then michael@0: version=$rev michael@0: if [ -n "$dirty" ]; then michael@0: version=$version-dirty michael@0: echo "WARNING: updating from a dirty git repository." michael@0: fi michael@0: sed -i "/The git commit ID used was/ s/[0-9a-f]\+\(-dirty\)\?\./$version./" README_MOZILLA michael@0: else michael@0: echo "Remember to update README_MOZILLA with the version details." michael@0: fi michael@0: