summaryrefslogtreecommitdiff
path: root/scripts/fetch-git.sh
blob: 9bff3ad020c0e4d15bafea74c1980bafbff3b8e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
set -e

if [ "$#" != 1 ] ; then
	echo 'usage: fetch-git.sh dir' >&2
	exit 2
fi

cd "$1"

git submodule update --init --checkout src
if [ -d patch ] ; then
	git -C src am --keep-non-patch --whitespace=nowarn "$PWD"/patch/*.patch
fi