summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2023-10-07 23:48:51 +0200
committeremkael <emkael@tlen.pl>2023-10-07 23:48:51 +0200
commit806cc67cc18ce3bf9699e0e8aaafa61e952a5a6a (patch)
treecee3160e9c21a55f18399de3ec9e06dc26140e93
parent02f8d50981c850305455eec2a1758d8acc68b5e6 (diff)
Dropbox dump sync optional
-rwxr-xr-xdumps/fetch-dropbox.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/dumps/fetch-dropbox.sh b/dumps/fetch-dropbox.sh
index 99db29e..2498be5 100755
--- a/dumps/fetch-dropbox.sh
+++ b/dumps/fetch-dropbox.sh
@@ -1,3 +1,8 @@
#!/bin/bash
-dbxcli ls -l "${LIGA_DROPBOX_DUMP_FOLDER}" | awk -F"ago" '{print $2}' | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' |
- xargs -I{} dbxcli get {} dumps/sync
+if [ -z ${LIGA_DROPBOX_DUMP_FOLDER+x} ]
+then
+ echo 'Dropbox dump not configured, skipping'
+else
+ dbxcli ls -l "${LIGA_DROPBOX_DUMP_FOLDER}" | awk -F"ago" '{print $2}' | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' |
+ xargs -I{} dbxcli get {} dumps/sync
+fi