I am trying to upload all changed files to my FTP server. However, I cannot use -S .tmp
and -v
when I use the -bb
flag - and I can't use those options with ncftpbatch
at all. Here is my code:
#!/bin/bash -eo pipefail
IN=$(git diff-tree --no-commit-id --name-only -r HEAD)
OUT=$(echo $IN | tr ";" "\n")
for file in "${OUT[@]}"; do
ncftpput -bb -S .tmp -v -u "zeussite@kolechia.heliohost.org" -p "*****" ftp.kolechia.heliohost.org "/" $file
done
ncftpbatch
As you can see, I need the -S .tmp
to avoid breaking the site during uploads. -v
provides output to prevent my CI service from timing out.
How can I upload only the changed files - without temporarily breaking the site? I'm thinking of just logging in separately for each file, but that is bad practice.