Commit bd143eea authored by Isabella Skořepová's avatar Isabella Skořepová

Revert "Custom sftp upload script" and related

This reverts commit 6a3bac13.
parent 2e6d8760
Pipeline #206 passed with stages
This diff is collapsed.
......@@ -4,15 +4,6 @@ then
echo -n "Heslo pro upload: "
read -s LFTP_PASSWORD; export LFTP_PASSWORD
fi
export PASSWORD=$LFTP_PASSWORD
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
USER=ok1kvk.cz-www-nove
HOST=krios.blueboard.cz
......@@ -35,7 +26,16 @@ if [ "$1" == "ftp" ]; then
echo "LFTP finished with return code $RET"
else
echo "Using SFTP"
/usr/bin/time -f "Upload took %e" -- node $DIR/sftp-sync.js --sourcedir build --server $HOST --user $USER --remotedir / --port 2121
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