-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
executable file
·38 lines (26 loc) · 1 KB
/
setup.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
31
32
33
34
35
36
37
38
#!/bin/bash
# exit if anything returns a non-zero code
# set -e
# shellcheck source=/dev/null
# source helper function to create or replace config files
source ~/.scripts/config/check_file_and_replace.sh
# shellcheck source=/dev/null
source ~/.scripts/config/check_or_create_dirs.sh
# shellcheck source=/dev/null
source ~/.scripts/config/test_report_submission.sh
# List of directories to be checked for
DIRECTORIES=( ~/.reports ~/backups )
# Make backups and reports directories if they don't exist
check_or_create_dirs "${DIRECTORIES[@]}"
# Create or replace the bash colors file
check_file_and_replace ~/.bash_colors ~/.scripts/config/.bash_colors 1
# Create or replace the upgrade script
check_file_and_replace ~/upgrade ~/.scripts/upgrade 0
# Create or replace the bash aliases
check_file_and_replace ~/.bash_aliases ~/.scripts/config/.bash_aliases 0
# Run flyway migrations
~/.scripts/config/flyway_bl.sh migrate
# Run backup script
~/.scripts/backupdb/backup.sh
# Test report submission
test_report_submission