summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 0000000000..107d7367c2
--- /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 0000000000..3b4a1e1441
--- /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 0000000000..621b24ef90
--- /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
+