Tool to monitor ebook device connection and sync remote (webdav) folder to ebook...
[sync-ebook.git] / sync-ebook
1 #!/bin/sh
2
3 . ~/.config/ebook.conf
4
5 mount-gvfs $DAVFS $USER $PASSWD
6
7 MOUNT=$XDG_RUNTIME_DIR/gvfs/
8 DIR=`gvfs-info $DAVFS | grep "id::filesystem" | awk '{ print $2; }'`
9
10 if [ "$DIR" != "" ]
11 then
12
13 MOUNT=$XDG_RUNTIME_DIR/gvfs/$DIR
14
15 if [ -d $EBOOK ]
16 then
17
18 rsync -ru --include=$TEMPLATE --exclude=.* "$MOUNT/$SRCDIR/" "$EBOOK/$DSTDIR/"
19
20 fi
21
22 fi