blob: 4ced81078b277d4a3ecc2898e59a83ea832ff5f7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/bin/sh
set -e
die() {
echo "error: $*" >&2
exit 1
}
email="${1?email file}"
tmp=$(mktemp -d)
trap "rm -rf -- $tmp" EXIT
git clone -q --depth=1 "https://git.sr.ht/~rjarry/aerc" "$tmp" ||
die "Failed to clone upstream repository. No network connection?"
export GIT_DIR="$tmp/.git"
git -C "$tmp" am -q3 "$email" ||
die "Failed to apply patch on current upstream master branch. git pull --rebase?"
make -sC "$tmp" all lint tests check-patches ||
die "Please fix the above issues and amend your patch."
|