diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
commit | 2aa4a82499d4becd2284cdb482213d541b8804dd (patch) | |
tree | b80bf8bf13c3766139fbacc530efd0dd9d54394c /media/libnestegg/update.sh | |
parent | Initial commit. (diff) | |
download | firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip |
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'media/libnestegg/update.sh')
-rwxr-xr-x | media/libnestegg/update.sh | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/media/libnestegg/update.sh b/media/libnestegg/update.sh new file mode 100755 index 0000000000..4be49f5a9e --- /dev/null +++ b/media/libnestegg/update.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# Usage: sh update.sh <upstream_src_directory> + +set -e + +[[ -n "$1" ]] || ( echo "syntax: $0 update_src_directory"; exit 1 ) +[[ -e "$1/src/nestegg.c" ]] || ( echo "$1: nestegg not found"; exit 1 ) + +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) + date=$(cd $1 && git show -s --format=%ci HEAD) + dirty=$(cd $1 && git diff-index --name-only HEAD) + set +e + pre_rev=$(grep -o '[[:xdigit:]]\{40\}' moz.yaml) + commits=$(cd $1 && git log --pretty=format:'%h - %s' $pre_rev..$rev) + set -e +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.bak -e "s/^ *release:.*/ release: \"$version ($date)\"/" moz.yaml + if [[ ! "$( grep "$version" moz.yaml )" ]]; then + echo "Updating moz.yaml failed." + exit 1 + fi + rm moz.yaml.bak + [[ -n "$commits" ]] && echo -e "Pick commits:\n$commits" +else + echo "Remember to update moz.yaml with the version details." +fi |