2

I have this script in the a Pipeline:

lftp -c
"
  set ftp:ssl-force true;
  set ssl:verify-certificate false;
  open -u $FTP_USER,$FTP_PASS $FTP_HOST;
  cd remote-folder;
  mirror -R -e -v -n ./dist ./;
"

It's working, but I don't wish to upload the dist folder itself, I only want to upload what's inside of it using mirror (since I just want newer/different files).

So in this case, I want everything inside the local dist folder to be inside the remote remote-folder folder (don't want to upload the folder itself).

Already tried mirror -R -e -v -n ./dist/* ./ but:

mirror: Access failed: .../dist/*: No such file or directory

1 Answers1

4

Specify dist/. as the source:

lftp> mirror -R -v localsrc/. remotedst/

lftp will then attempt to upload into remotedst/./ which is just the same remotedst.

Also works for local copies:

$ cp -r -v src/. dst/
grawity
  • 501,077