summaryrefslogtreecommitdiffstats
path: root/script
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-09-26 00:00:53 +0200
committerMichael Adam <obnox@samba.org>2013-11-13 14:12:51 +0100
commite80a5aba3db8e81173fa443991e08ef4a300ea5c (patch)
tree7befebb71a5c4c8e85ce922e10736734785b66ef /script
parent6142bce0cdb8744bedf9b8a67cb58a165fb99b0c (diff)
downloadsamba-e80a5aba3db8e81173fa443991e08ef4a300ea5c.tar.gz
samba-e80a5aba3db8e81173fa443991e08ef4a300ea5c.tar.xz
samba-e80a5aba3db8e81173fa443991e08ef4a300ea5c.zip
script: add ctdb-import.* scripts
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'script')
-rwxr-xr-xscript/ctdb-import.msg-filter.sh11
-rwxr-xr-xscript/ctdb-import.tree-filter.sh14
-rw-r--r--script/ctdb-import.txt5
3 files changed, 30 insertions, 0 deletions
diff --git a/script/ctdb-import.msg-filter.sh b/script/ctdb-import.msg-filter.sh
new file mode 100755
index 00000000000..107d7367c2e
--- /dev/null
+++ b/script/ctdb-import.msg-filter.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+#
+
+set -e
+set -u
+
+cat -
+echo ""
+echo "(This used to be ctdb commit ${GIT_COMMIT})"
+
+exit 0
diff --git a/script/ctdb-import.tree-filter.sh b/script/ctdb-import.tree-filter.sh
new file mode 100755
index 00000000000..3b4a1e14418
--- /dev/null
+++ b/script/ctdb-import.tree-filter.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+#
+
+set -e
+set -u
+
+lo=$(find -mindepth 1 -maxdepth 1)
+for o in $lo; do
+ mkdir -p ctdb
+ mv $o ctdb/
+done
+
+exit 0
+
diff --git a/script/ctdb-import.txt b/script/ctdb-import.txt
new file mode 100644
index 00000000000..621b24ef904
--- /dev/null
+++ b/script/ctdb-import.txt
@@ -0,0 +1,5 @@
+ctdb-import.git$ git filter-branch \
+ --tree-filter /path/to/ctdb-import.tree-filter.sh \
+ --msg-filter /path/to/ctdb-import.msg-filter.sh \
+ HEAD
+