2010-05-25 08:40:08 +04:00
|
|
|
# Usage: sh update.sh <upstream_src_directory>
|
|
|
|
cp $1/include/nestegg/nestegg.h include
|
|
|
|
cp $1/src/nestegg.c src
|
|
|
|
cp $1/LICENSE .
|
2014-09-29 04:13:10 +04:00
|
|
|
cp $1/README.md .
|
2010-05-25 08:40:08 +04:00
|
|
|
cp $1/AUTHORS .
|
2010-09-07 08:54:17 +04:00
|
|
|
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
|
|
|
|
|