summaryrefslogtreecommitdiff
path: root/scripts/fetch-git.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/fetch-git.sh')
-rw-r--r--scripts/fetch-git.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/fetch-git.sh b/scripts/fetch-git.sh
new file mode 100644
index 00000000..eea32d1c
--- /dev/null
+++ b/scripts/fetch-git.sh
@@ -0,0 +1,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 --whitespace=nowarn "$PWD"/patch/*
+fi