uploadScreenshotSummary.sh 575 B

1234567891011121314151617
  1. #!/bin/bash -x
  2. #1: LOG_USERNAME
  3. #2: LOG_PASSWORD
  4. DAV_URL=https://nextcloud.kaminsky.me/remote.php/webdav/android-screenshot-summary/
  5. PUBLIC_URL=https://www.kaminsky.me/nc-dev/android-screenshot-summary
  6. USER=$1
  7. PASS=$2
  8. date=$(date +%F)
  9. echo "Uploaded screenshot summary to $PUBLIC_URL/$date/summary.html"
  10. cd app/build/screenshotSummary
  11. find . -type d -exec curl > /dev/null 2>&1 -u $USER:$PASS -X MKCOL $DAV_URL/$date/$(echo {} | sed s#\./##) \;
  12. find . -type f -exec curl > /dev/null 2>&1 -u $USER:$PASS -X PUT $DAV_URL/$date/$(echo {} | sed s#\./##) --upload-file {} \;