|
@@ -20,7 +20,7 @@ set files (find $DIST_DIR -type f)
|
|
|
echo 'Directories to be created :'
|
|
|
echo $make_dirs
|
|
|
echo 'Files to be sent :'
|
|
|
-echo $files
|
|
|
+printf %s\n $files
|
|
|
|
|
|
echo "FTP to $FTP_HOST"
|
|
|
read --prompt-str "[deploy] password for $FTP_USER: " --silent password
|
|
@@ -28,11 +28,11 @@ echo
|
|
|
require password
|
|
|
|
|
|
# ftp operation
|
|
|
-set ftp_cmd "\
|
|
|
-user $FTP_USER $password
|
|
|
-$make_dir
|
|
|
-nmap $DIST_DIR/\$1 $FTP_DEST/\$1
|
|
|
-mput $files
|
|
|
-bye
|
|
|
-"
|
|
|
-echo $ftp_cmd | ftp -pvin $FTP_HOST $FTP_PORT
|
|
|
+set ftp_connect "user $FTP_USER $password"
|
|
|
+set ftp_nmap "nmap $DIST_DIR/\$1 $FTP_DEST/\$1"
|
|
|
+set ftp_mput "mput $files"
|
|
|
+
|
|
|
+echo "Format whole command"
|
|
|
+printf %s\n "user $FTP_USER ******" $make_dirs $ftp_nmap $ftp_mput 'bye'
|
|
|
+echo "Forward whole command to FTP"
|
|
|
+printf %s\n $ftp_connect $make_dirs $ftp_nmap $ftp_mput 'bye' | ftp -pvin $FTP_HOST $FTP_PORT
|