#!/bin/bash echo 'Deploy website through FTP' : "{FTP_HOST:?FTP_HOST not set or empty}" : "{FTP_USER:?FTP_USER not set or empty}" : "{FTP_PORT:=21}" : "{FTP_DEST:=www}" : "{DIST_DIR:=dist}" files=`find $DIST_DIR -type f` echo 'Files to be sent :' echo "$files" echo "FTP to $FTP_HOST" read -s -p "[deploy] password for $FTP_USER: " password echo # ftp operation ftp -pvin $FTP_HOST $FTP_PORT<