Dactyloidae/media/libnestegg/update.sh
Job Bautista b7a771fce6 Issue #1948 - Update nestegg library.
I separated out the AVC and AAC support code into a patch file so that
 the upstream code can be updated freely without having to re-add AVC
 and AAC support again. At least if the upstream changes are not too
 extensive...
This should effectively backport Mozilla bug 1539686, which allows the
 browser to parse the color information from WebM videos that uses HDR.
2022-07-02 17:00:36 +08:00

26 lines
671 B
Bash

# 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 .
# Patch the imported files.
patch -p1 < mcp-avcaacsupport.patch
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_MCP
else
echo "Remember to update README_MCP with the version details."
fi