Refactored backup list

This commit is contained in:
Kevin Veen-Birkenbach 2020-05-15 19:57:25 +02:00
parent 8c5bcfb18c
commit 1faf5690c1
2 changed files with 12 additions and 12 deletions

View File

@ -12,18 +12,6 @@ SCRIPT_PATH="$REPOSITORY_PATH/scripts/";
DATA_PATH="$DECRYPTED_PATH/data";
BACKUP_PATH="$DECRYPTED_PATH/backup";
TEMPLATE_PATH="$REPOSITORY_PATH/templates";
LOCAL_REPOSITORIES_PATH="$HOME/Repositories";
declare -a BACKUP_LIST=("$HOME/.ssh/" \
"$HOME/.gitconfig" \
"$HOME/.atom/config.cson" \
"$HOME/.local/share/rhythmbox/rhythmdb.xml" \
"$HOME/.config/keepassxc/keepassxc.ini" \
"$HOME/Documents/certificates/" \
"$HOME/Documents/recovery_codes/" \
"$HOME/Documents/identity/" \
"$HOME/Documents/passwords/" \
"$HOME/Documents/licenses/");
COLOR_RED=$(tput setaf 1)
COLOR_GREEN=$(tput setaf 2)

View File

@ -7,6 +7,18 @@
# shellcheck disable=SC2143 # Comparing with -z allowed
# shellcheck disable=SC2015 # Deactivating bool hint
source "$(dirname "$(readlink -f "${0}")")/../base.sh" || (echo "Loading base.sh failed." && exit 1)
declare -a BACKUP_LIST=("$HOME/.ssh/" \
"$HOME/.gitconfig" \
"$HOME/.atom/config.cson" \
"$HOME/.local/share/rhythmbox/rhythmdb.xml" \
"$HOME/.config/keepassxc/keepassxc.ini" \
"$HOME/Documents/certificates/" \
"$HOME/Documents/recovery_codes/" \
"$HOME/Documents/identity/" \
"$HOME/Documents/passwords/" \
"$HOME/Documents/licenses/");
if [ -z "$(mount | grep "$DECRYPTED_PATH")" ]
then
info "The decrypted folder $DECRYPTED_PATH is locked. You need to unlock it!" &&