#!/bin/bash ## $ dtf-commit-results RESULTS SUBDIR [ DB ] . "@sysconfdir@/dtf.sh" || exit 1 # argparse resultdir="$1" subresultdir="$2" db="$DTF_DATABASE_DEFAULT" test -n "$3" && db="$3" if test -z "$db" \ || test -z "$resultdir" then echo >&2 "something is wrong, try bash -x" exit 1 fi if test -f "$resultdir/dtf.tar.gz"; then # Unpack tarball if available.. ( cd "$resultdir" && tar -xf dtf.tar.gz ) fi mkdir -p "$db/$subresultdir" || exit 1 ( cd "$resultdir" && cp -r . "$db/$subresultdir" )