blob: db3b47dbf4ff6f4e0eaf41818fadcd7346166be8 (
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 -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
|