Implemented error if base can't be loaded

This commit is contained in:
2020-05-02 12:30:21 +02:00
parent d7cb45aae9
commit f385bc3d98
9 changed files with 10 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/bash
# Executes all scripts which are necessary to backup data
# @author Kevin Veen-Birkenbach [aka. Frantz]
source "$(dirname "$(readlink -f "${0}")")/base.sh"
source "$(dirname "$(readlink -f "${0}")")/base.sh" || echo "Loading base.sh failed." && exit 1
bash "$SCRIPT_PATH/import-data-from-system.sh"
bash "$SCRIPT_PATH/push-local-repositories.sh"

View File

@@ -2,5 +2,5 @@
# Executes the import script in reverse mode
# @author Kevin Veen-Birkenbach [aka. Frantz]
# shellcheck source=/dev/null # Deactivate SC1090
source "$(dirname "$(readlink -f "${0}")")/base.sh"
source "$(dirname "$(readlink -f "${0}")")/base.sh" || echo "Loading base.sh failed." && exit 1
bash "$SCRIPT_PATH/import-data-from-system.sh" reverse

View File

@@ -6,7 +6,7 @@
#
# shellcheck source=/dev/null # Deactivate SC1090
# shellcheck disable=SC2143 # Comparing with -z allowed
source "$(dirname "$(readlink -f "${0}")")/base.sh"
source "$(dirname "$(readlink -f "${0}")")/base.sh" || echo "Loading base.sh failed." && exit 1
if [ -z "$(mount | grep "$DECRYPTED_PATH")" ]
then
echo "The decrypted folder $DECRYPTED_PATH is locked. You need to unlock it!"