blob: 333c3b89034acf80b51d14b4cad6f33c79a79b0f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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 -X GET -u $username:$password $server/remote.php/dav/files/$username/$file --output $path
}
case $1 in
-u) upload;;
-d) download;;
*) echo -e "drivesync\n -u: Upload file\n -d: Download file";;
esac
|