This commit is contained in:
Daniel Flanagan 2020-12-14 11:35:35 -06:00
parent d5800bed8b
commit 1be1b65904
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
2 changed files with 2 additions and 2 deletions

View file

@ -2,4 +2,4 @@
f="${1}" f="${1}"
uuid="$(uuidgen -t)" uuid="$(uuidgen -t)"
upload "${f}" "${uuid}/${f}" "pastes" upload "${f}" "${uuid}/$(basename "$f")" "pastes"

View file

@ -18,7 +18,7 @@ if [ "$(curl -s -o /dev/null -w "%{http_code}" "${url}")" -eq 200 ]; then
exit 3 exit 3
fi fi
ssh "$HOST" mkdir -p "${internal_dir}" ssh "$HOST" mkdir -p "$(dirname "${internal_dir}/${fname}")"
rsync --progress --no-owner --no-group --chmod=644 --ignore-existing "${f}" "${HOST}:${internal_dir}/${fname}" | tee "${HOME}/.upload.log" rsync --progress --no-owner --no-group --chmod=644 --ignore-existing "${f}" "${HOST}:${internal_dir}/${fname}" | tee "${HOME}/.upload.log"
code="$?" code="$?"
echo "Uploaded to: ${url}" echo "Uploaded to: ${url}"