Fixes
This commit is contained in:
parent
d5800bed8b
commit
1be1b65904
2
bin/pbin
2
bin/pbin
|
@ -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"
|
||||||
|
|
|
@ -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}"
|
||||||
|
|
Reference in a new issue