drone-webdav/push.sh
2017-05-27 00:11:08 -07:00

8 lines
232 B
Bash

#! /bin/sh
# If username and password are provided, add auth
if [ ! -z "$PLUGIN_USERNAME" ] && [ ! -z "$PLUGIN_PASSWORD" ]; then
AUTH="-u ${PLUGIN_USERNAME}:${PLUGIN_PASSWORD}"
fi
curl -T $PLUGIN_FILE $AUTH $PLUGIN_DESTINATION