From 1faf5690c12b4dd62c8c119cf0887d6281f3c880 Mon Sep 17 00:00:00 2001 From: "Kevin Veen-Birkenbach [aka. Frantz]" Date: Fri, 15 May 2020 19:57:25 +0200 Subject: [PATCH] Refactored backup list --- scripts/base.sh | 12 ------------ scripts/data/import-from-system.sh | 12 ++++++++++++ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/base.sh b/scripts/base.sh index aa6986f..5b28e16 100644 --- a/scripts/base.sh +++ b/scripts/base.sh @@ -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) diff --git a/scripts/data/import-from-system.sh b/scripts/data/import-from-system.sh index ae4d4bf..2537cae 100644 --- a/scripts/data/import-from-system.sh +++ b/scripts/data/import-from-system.sh @@ -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!" &&