diff options
Diffstat (limited to 'sync-from-kobo')
-rwxr-xr-x | sync-from-kobo | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/sync-from-kobo b/sync-from-kobo deleted file mode 100755 index 74b89ef..0000000 --- a/sync-from-kobo +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -# -# A mini-wrapper to sync a kobo folder into a local one. -# - -# Parameters -BASENAME="`basename $0`" -BASEFOLDER="$HOME/data/doc" -COLLECTION="$1" - -# Check -if [ -z "$COLLECTION" ]; then - echo "usage: $BASENAME <colletion>" - echo "available collections:" - echo "" - ls $BASEFOLDER - exit 1 -fi - -# Ensure collection exists -if [ ! -d "$BASEFOLDER/$COLLECTION" ]; then - echo "error: no such collection $COLLECTION at $BASEFOLDER" - exit 1 -fi - -# Setup origin -if [ "$COLLECTION" == "clipboard" ]; then - ORIGIN="/mnt/onboard/.adds/koreader/clipboard" -else - ORIGIN="/mnt/sd/$COLLECTION" -fi - -# Dispatch -lftp -c "open sftp://kobo && mirror -L $ORIGIN $BASEFOLDER/$COLLECTION" |