summaryrefslogtreecommitdiffstats
path: root/controller/libexec/dtf-commit-results.in
blob: 86b31d7ef611bfd9653968b2c2d980cb5dceca72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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" )