Commit 3379608a authored by Isabella Skořepová's avatar Isabella Skořepová

Delete upload

parent 10890aab
Pipeline #488 failed with stages
in 1 minute and 15 seconds
echo "UPLOADER 1.0"
if [ -z "$LFTP_PASSWORD" ]
then
echo -n "Heslo pro upload: "
read -s LFTP_PASSWORD; export LFTP_PASSWORD
fi
USER=ok1kvk.cz-www-nove
HOST=krios.blueboard.cz
MAX_RETRIES=2
RECONNECT_INTERVAL=5
echo "======================================================================"
echo "Uploading to $HOST"
if [ "$1" == "ftp" ]; then
echo "Using FTP"
/usr/bin/time -f "Upload took %e" -- lftp -e "set cmd:fail-exit yes;\
set net:timeout 5;\
set net:reconnect-interval-base $RECONNECT_INTERVAL;\
set net:max-retries $MAX_RETRIES;\
set ftp:ssl-allow no;\
open --user $USER --env-password ftp://$HOST/;\
mirror -c --verbose=9 -e -R -L ./build /;\
exit 0;"
RET=$?
echo "LFTP finished with return code $RET"
else
echo "Using SFTP"
time lftp -e "set sftp:auto-confirm yes;\
set cmd:fail-exit yes;\
set net:timeout 5;\
set net:reconnect-interval-base $RECONNECT_INTERVAL;\
set net:max-retries $MAX_RETRIES;\
open --user $USER --env-password -p 2121 sftp://$HOST/;\
mirror -c --verbose=9 -e -R -L ./build /;\
exit 0;"
RET=$?
echo "LFTP finished with return code $RET"
fi
exit 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment