/t/t18-tarball-encryption.sh

http://github.com/sukria/Backup-Manager · Shell · 42 lines · 24 code · 9 blank · 9 comment · 2 complexity · 30c16f4f4f1747ba1a78e66d9de372ab MD5 · raw file

  1. #!/bin/sh
  2. set -e
  3. # Each test script should include testlib.sh
  4. source testlib.sh
  5. # When the test is ready, set this to false for nice outputs.
  6. # if you want to see what happens, use those flags
  7. # verbose="true"
  8. # warnings="true"
  9. # The conffile part of the test, see confs/* for details.
  10. source confs/base.conf
  11. source confs/tarball.conf
  12. export BM_ARCHIVE_ROOT="repository"
  13. export BM_ARCHIVE_METHOD="tarball"
  14. export BM_TARBALL_DIRECTORIES="$PWD"
  15. export BM_TARBALL_FILETYPE="tar.gz"
  16. export BM_ENCRYPTION_METHOD="gpg"
  17. export BM_ENCRYPTION_RECIPIENT="0x1EE5DD34"
  18. source $locallib/sanitize.sh
  19. # The test actions
  20. if [[ -e $BM_ARCHIVE_ROOT ]]; then
  21. rm -f $BM_ARCHIVE_ROOT/*
  22. fi
  23. bm_init_env
  24. bm_init_today
  25. create_directories
  26. make_archives
  27. name=$(get_dir_name $PWD long)
  28. if [[ -e "$BM_ARCHIVE_ROOT/$BM_ARCHIVE_PREFIX$name.$TODAY.master.tar.gz.gpg" ]]; then
  29. # rm -rf $BM_ARCHIVE_ROOT
  30. exit 0
  31. else
  32. exit 1
  33. fi