summaryrefslogtreecommitdiff
path: root/scripts/fetch-git.rc
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2016-06-27 20:30:15 -0700
committerMichael Forney <mforney@mforney.org>2016-06-27 20:30:15 -0700
commitf732e53f58b8f92132dece66b05f32576f830cc4 (patch)
treeb494541dae14382ed9865cda387c09e2c4d9db50 /scripts/fetch-git.rc
parent2b32697b70a7429c490b47723a9469fc14310ae9 (diff)
Integrate source fetching into ninja files
Diffstat (limited to 'scripts/fetch-git.rc')
-rwxr-xr-xscripts/fetch-git.rc17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/fetch-git.rc b/scripts/fetch-git.rc
new file mode 100755
index 00000000..fec6a809
--- /dev/null
+++ b/scripts/fetch-git.rc
@@ -0,0 +1,17 @@
+#!/bin/rc
+
+flag e +
+
+if(! ~ $#* 1) {
+ echo 'usage: fetch-git.rc dir' >[1=2]
+ exit 2
+}
+
+cd $1
+
+git submodule update --init --checkout src
+if([ -d patch ]) {
+ patches=patch/*
+ git -C src am ../$patches
+}
+status=()