Skip to content
Snippets Groups Projects
Commit 3379608a authored by Isabella Skořepová's avatar Isabella Skořepová
Browse files

Delete upload

parent 10890aab
No related branches found
No related tags found
No related merge requests found
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment