summaryrefslogtreecommitdiff
path: root/scripts/sync_patches.sh
blob: c47b23d14b8a2bdcf8987017860f7a7d55ece2a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

set -e

usage() {
	echo "Usage: $0 <procd git repository>"
	exit 1
}

if [ $# -ne 1 ]; then
        usage
fi

repo=$1
tmpdir=/tmp/procd.$$

git clone $repo $tmpdir

for ver in openwrt-18.06 master; do
	outdir=$(pwd)/patches/procd-$ver
	git rm $outdir/00*
	(cd $tmpdir && git format-patch --output-directory $outdir origin/$ver...origin/lxd/$ver)
	git add $outdir/00*
done