Skip to content

Commit f89cd50

Browse files
committed
Fixed bug: wrong config location when current dir not the same as script dir.
1 parent 24ff14b commit f89cd50

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

backup.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
#!/bin/sh
22

3+
CURRENT_DIR="$( cd "$( dirname "$0" )" && pwd )"
4+
35
# =================
46
# Import the config
57
# =================
68

7-
. ./config.sh
9+
. $CURRENT_DIR/config.sh
810

911
# =============
1012
# The script...
@@ -25,7 +27,7 @@ done
2527

2628
if [ "$upload_to_dropbox" = "true" ]; then
2729
echo "Uploading to dropbox"
28-
bash vendor/dropbox_uploader.sh upload $backup_dir $thetime
30+
bash $CURRENT_DIR/vendor/dropbox_uploader.sh upload $backup_dir $thetime
2931
fi
3032

3133
if [ "$delete_created_backups" = "true" ]; then

0 commit comments

Comments
 (0)