Adapted base path loading function

This commit is contained in:
Kevin Veen-Birkenbach 2020-05-02 12:39:00 +02:00
parent c7a804f3f1
commit a49901eb5b
7 changed files with 7 additions and 7 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" || echo "Loading base.sh failed." && exit 1
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" || echo "Loading base.sh failed." && exit 1
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" || echo "Loading base.sh failed." && exit 1
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!"

View File

@ -4,6 +4,6 @@
# @author Kevin Veen-Birkenbach [aka. Frantz]
#
# shellcheck source=/dev/null # Deactivate SC1090
source "$(dirname "$(readlink -f "${0}")")/base.sh" || echo "Loading base.sh failed." && exit 1
source "$(dirname "$(readlink -f "${0}")")/../base.sh" || (echo "Loading base.sh failed." && exit 1)
echo "Locking directory $DECRYPTED_PATH..."
fusermount -u "$DECRYPTED_PATH" && echo "Data is now encrypted." && echo "Removing directory $DECRYPTED_PATH..." && rmdir "$DECRYPTED_PATH"

View File

@ -4,7 +4,7 @@
# @author Kevin Veen-Birkenbach [aka. Frantz]
#
# shellcheck source=/dev/null # Deactivate SC1090
source "$(dirname "$(readlink -f "${0}")")/base.sh" || echo "Loading base.sh failed." && exit 1
source "$(dirname "$(readlink -f "${0}")")/../base.sh" || (echo "Loading base.sh failed." && exit 1)
echo "Unlocking directory $DECRYPTED_PATH..."
if [ ! -d "$DECRYPTED_PATH" ]
then

View File

@ -2,5 +2,5 @@
#
# Pushs all repositories
# @author Kevin Veen-Birkenbach [aka. Frantz]
source "$(dirname "$(readlink -f "${0}")")/base.sh" || echo "Loading base.sh failed." && exit 1
source "$(dirname "$(readlink -f "${0}")")/../base.sh" || (echo "Loading base.sh failed." && exit 1)
bash "$SCRIPT_PATH/push-local-repositories.sh" push

View File

@ -3,7 +3,7 @@
# Pushs all repositories
# @param $1 git command which should be executed instead of default pull
# @author Kevin Veen-Birkenbach [aka. Frantz]
source "$(dirname "$(readlink -f "${0}")")/base.sh" || echo "Loading base.sh failed." && exit 1
source "$(dirname "$(readlink -f "${0}")")/../base.sh" || (echo "Loading base.sh failed." && exit 1)
if [ $# -eq 1 ]
then
git_command=$1