Skip to content

Instantly share code, notes, and snippets.

@alekzonder
Last active November 3, 2016 11:21
Show Gist options
  • Save alekzonder/043a3e06cdbb617fa494ca2cedf72a39 to your computer and use it in GitHub Desktop.
Save alekzonder/043a3e06cdbb617fa494ca2cedf72a39 to your computer and use it in GitHub Desktop.
upload current directory to webdav
#!/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