Last active
November 3, 2016 11:21
-
-
Save alekzonder/043a3e06cdbb617fa494ca2cedf72a39 to your computer and use it in GitHub Desktop.
upload current directory to webdav
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
url=$1 | |
if [ -z "$url" ]; then | |
echo 'no url for upload' | |
exit 1 | |
fi | |
find ./* -type f | sed -e 's,^\./,,' | while read i; do echo "$url/$i"; curl -T $i "$url/$i"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment