From 864f0fd9588ced475e6cc609273e259d9f8d431e Mon Sep 17 00:00:00 2001 From: stkhan Date: Thu, 7 Dec 2023 19:07:44 +0000 Subject: Init commit --- drivesync | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 drivesync (limited to 'drivesync') 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 -- cgit v1.2.3