new fortunes
[feisty_meow.git] / testkit / library / produce_test_package.sh
1 #!/bin/bash
2
3 # Creates an archive from the test scripts.
4 #
5 # Author: Chris Koeritz
6
7 export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )"  # obtain the script's working directory.
8 cd "$WORKDIR"
9 export SHOWED_SETTINGS_ALREADY=true
10 if [ -z "$TESTKIT_SENTINEL" ]; then
11   source ../prepare_tools.sh ../prepare_tools.sh 
12 fi
13 source "$TESTKIT_ROOT/library/establish_environment.sh"
14
15 pushd "$TESTKIT_ROOT/.." &>/dev/null
16 justdir="$(basename "$TESTKIT_ROOT")"
17
18 date_string="$(date +"%Y_%b_%e_%H%M" | sed -e 's/ //g')"
19
20 EXCLUDES=(--exclude=".svn" --exclude="docs" --exclude="random*.dat" --exclude=gzip-1.2.4 --exclude=iozone3_397 --exclude="mount-*" --exclude="releases" --exclude="passwords.txt" --exclude="saved_deployment_info.txt" --exclude="generated_certs" --exclude="gridwide_certs" --exclude="testkit.config*" --exclude="inputfile.txt*")
21
22 tar -czf "$HOME/testkit_${date_string}.tar.gz" "$justdir" ${EXCLUDES[*]} 
23
24 popd &>/dev/null
25