-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathclean.sh
executable file
·30 lines (25 loc) · 931 Bytes
/
clean.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
#
# Simon Schürg ([email protected])
# Exit on error. Append || true if you expect an error.
set -o errexit
# Exit on error inside any functions or subshells.
set -o errtrace
# Do not allow use of undefined vars. Use ${VAR:-} to use an undefined VAR
set -o nounset
# Catch the error in case mysqldump fails (but gzip succeeds) in `mysqldump |gzip`
set -o pipefail
# Turn on traces, useful while debugging but commented out by default
#set -o xtrace
# Set magic variables for current file, directory, os, etc.
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
__file="${__dir}/$(basename "${BASH_SOURCE[0]}")"
__base="$(basename ${__file} .sh)"
# allow to run this script from every directory
cd ${__dir}
vagrant halt --force
vagrant destroy --force
find . -type f -name "*.log" -exec rm -f {} \;
rm -rf ./.vagrant
rm -rf ./ansible/roles/schuerg.prerequisites
rm -rf ./ansible/roles/geerlingguy.docker