From e80a5aba3db8e81173fa443991e08ef4a300ea5c Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 26 Sep 2013 00:00:53 +0200 Subject: script: add ctdb-import.* scripts Signed-off-by: Stefan Metzmacher Reviewed-by: Michael Adam --- script/ctdb-import.msg-filter.sh | 11 +++++++++++ script/ctdb-import.tree-filter.sh | 14 ++++++++++++++ script/ctdb-import.txt | 5 +++++ 3 files changed, 30 insertions(+) create mode 100755 script/ctdb-import.msg-filter.sh create mode 100755 script/ctdb-import.tree-filter.sh create mode 100644 script/ctdb-import.txt 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 + -- cgit