Using relative to script paths

This commit is contained in:
FrederikBaerentsen 2024-06-06 08:21:28 +02:00
parent 8d71b82eec
commit 2945b2ce1c
3 changed files with 10 additions and 7 deletions

View File

@ -6,3 +6,4 @@
- `mountBackblaze.sh`: Mount Backblaze B2 bucket using Restic. - `mountBackblaze.sh`: Mount Backblaze B2 bucket using Restic.
- `techem.sh`: Download Water (hot/cold) and Heat statistics

View File

@ -1,6 +1,9 @@
#!/bin/bash #!/bin/bash
source ./account
source ./bucket parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
source "$parent_path/account"
source "$parent_path/bucket"
FOLDER="/home/drudoo/Pi2/immich" FOLDER="/home/drudoo/Pi2/immich"

View File

@ -1,12 +1,11 @@
#!/bin/bash #!/bin/bash
source ./account parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
source ./bucket
source "$parent_path/account"
source "$parent_path/bucket"
FOLDER='restic_mount' FOLDER='restic_mount'
# EDIT ABOVE
echo 'Mounting '$RESTIC_BUCKET echo 'Mounting '$RESTIC_BUCKET
restic mount -r b2:$RESTIC_BUCKET /home/drudoo/$FOLDER restic mount -r b2:$RESTIC_BUCKET /home/drudoo/$FOLDER