PageRenderTime 17ms CodeModel.GetById 14ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1ms

/t/t01-tarball.sh

http://github.com/sukria/Backup-Manager
Shell | 41 lines | 23 code | 9 blank | 9 comment | 2 complexity | 84ae8838a0967451327e6c89a7463024 MD5 | raw file
 1#! /usr/bin/env bash
 2
 3set -e
 4
 5# Each test script should include testlib.sh
 6source testlib.sh
 7# When the test is ready, set this to false for nice outputs.
 8# if you want to see what happens, use those flags
 9# verbose="true"
10# verbosedebug="true"
11# warnings="true"
12
13# The conffile part of the test, see confs/* for details.
14source confs/base.conf
15source confs/tarball.conf
16
17export BM_ARCHIVE_ROOT="repository"
18export BM_ARCHIVE_METHOD="tarball"
19export BM_TARBALL_DIRECTORIES="$PWD"
20export BM_TARBALL_FILETYPE="tar.gz"
21source $locallib/sanitize.sh
22
23# The test actions
24
25if [[ -e $BM_ARCHIVE_ROOT ]]; then
26    rm -f $BM_ARCHIVE_ROOT/*
27fi    
28
29bm_init_env
30bm_init_today
31
32create_directories
33make_archives
34
35name=$(get_dir_name $PWD long)
36if [[ -e "$BM_ARCHIVE_ROOT/$BM_ARCHIVE_PREFIX$name.$TODAY.master.tar.gz" ]]; then
37    rm -rf $BM_ARCHIVE_ROOT
38    exit 0
39else
40    exit 1
41fi