summaryrefslogtreecommitdiff
path: root/drivesync
diff options
context:
space:
mode:
Diffstat (limited to 'drivesync')
-rwxr-xr-xdrivesync19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivesync b/drivesync
new file mode 100755
index 0000000..db3b47d
--- /dev/null
+++ b/drivesync
@@ -0,0 +1,19 @@
+#!/bin/sh
+source ~/.config/drivesync.conf
+file=$2
+path=$3
+
+upload() {
+ curl -u $username:$password -T $file $server/remote.php/dav/files/$username/$path/
+}
+
+download() {
+ curl -u $username:$password -T $file $server/remote.php/dav/files/$username/$path/
+
+}
+
+case $1 in
+ -u) upload;;
+ -d) download;;
+ *) echo -e "drivesync\n -u: Upload file\n -d: Download file";;
+esac