diff options
Diffstat (limited to 'controller/libexec/dtf-commit-results.in')
-rw-r--r-- | controller/libexec/dtf-commit-results.in | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/controller/libexec/dtf-commit-results.in b/controller/libexec/dtf-commit-results.in new file mode 100644 index 0000000..86b31d7 --- /dev/null +++ b/controller/libexec/dtf-commit-results.in @@ -0,0 +1,19 @@ +#!/bin/bash + +. "@sysconfdir@/dtf.sh" || exit 1 + +# argparse +resultdir="$1" + +db="$DTF_DATABASE_DEFAULT" +test -n "$2" && db="$2" + +if test -z "$db" \ + || test -z "$resultdir" \ + || test ! -f "$resultdir/dtf.tar.gz" +then + echo >&2 "something is wrong, try bash -x" + exit 1 +fi + +( cd "$resultdir" && tar -xf dtf.tar.gz && cp -r dtf "$db/$ressubdir" ) |