aboutsummaryrefslogtreecommitdiff
path: root/sync-to-kobo
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2020-08-01 21:40:09 -0300
committerSilvio Rhatto <rhatto@riseup.net>2020-08-01 21:40:09 -0300
commit01b544d19794208a9e228493fcfadfd4ef6b1882 (patch)
tree2d7d4a79bf3d2d682f56b7b5ca916f1be695b339 /sync-to-kobo
parent9a4954b7c2dfd3f5096eecbe340162dc82fd1203 (diff)
downloadscripts-01b544d19794208a9e228493fcfadfd4ef6b1882.tar.gz
scripts-01b544d19794208a9e228493fcfadfd4ef6b1882.tar.bz2
Support for subcollections with spaces at sync-to-kobo
Diffstat (limited to 'sync-to-kobo')
-rwxr-xr-xsync-to-kobo6
1 files changed, 3 insertions, 3 deletions
diff --git a/sync-to-kobo b/sync-to-kobo
index 37e06e1..edfabf1 100755
--- a/sync-to-kobo
+++ b/sync-to-kobo
@@ -6,12 +6,12 @@
# Parameters
BASENAME="`basename $0`"
BASEFOLDER="$HOME/data/doc"
-COLLECTION="$1"
+COLLECTION="$*"
# Check
if [ -z "$COLLECTION" ]; then
echo "usage: $BASENAME <colletion>"
- echo "available collections:"
+ echo "available base collections:"
echo ""
ls $BASEFOLDER
exit 1
@@ -24,4 +24,4 @@ if [ ! -d "$BASEFOLDER/$COLLECTION" ]; then
fi
# Dispatch
-lftp -c "open sftp://kobo && mirror -X *.sdr --delete -L -R $BASEFOLDER/$COLLECTION /mnt/sd/$COLLECTION"
+lftp -c "open sftp://kobo && mirror -X *.sdr --delete -L -R \"$BASEFOLDER/$COLLECTION\" \"/mnt/sd/$COLLECTION\""