2021-07-15 10:00:38 +03:00
|
|
|
#!/bin/bash -x
|
|
|
|
|
2024-03-29 18:56:51 +03:00
|
|
|
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
# SPDX-FileCopyrightText: 2021 Tobias Kaminsky <tobias@kaminsky.me>
|
2024-03-29 21:22:56 +03:00
|
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
2024-03-29 18:56:51 +03:00
|
|
|
|
2021-07-15 10:00:38 +03:00
|
|
|
#1: LOG_USERNAME
|
|
|
|
#2: LOG_PASSWORD
|
|
|
|
|
|
|
|
DAV_URL=https://nextcloud.kaminsky.me/remote.php/webdav/android-screenshot-summary/
|
|
|
|
PUBLIC_URL=https://www.kaminsky.me/nc-dev/android-screenshot-summary
|
|
|
|
USER=$1
|
|
|
|
PASS=$2
|
|
|
|
|
|
|
|
date=$(date +%F)
|
|
|
|
echo "Uploaded screenshot summary to $PUBLIC_URL/$date/summary.html"
|
|
|
|
|
2022-03-11 13:14:46 +03:00
|
|
|
cd app/build/screenshotSummary
|
2021-07-15 10:00:38 +03:00
|
|
|
|
|
|
|
find . -type d -exec curl > /dev/null 2>&1 -u $USER:$PASS -X MKCOL $DAV_URL/$date/$(echo {} | sed s#\./##) \;
|
|
|
|
find . -type f -exec curl > /dev/null 2>&1 -u $USER:$PASS -X PUT $DAV_URL/$date/$(echo {} | sed s#\./##) --upload-file {} \;
|