lftp在不同文件夹中上载文件

lftp在不同文件夹中上载文件,ftp,lftp,Ftp,Lftp,我需要上传文件,在不同的文件夹同名,递归到一个远程文件夹。这里有一个例子 Local |-app1-1 | |-src | |-img | |-static | |-app1-2 <------Upload from this | |-file1-1 | |-file1-2 |-app2-1 | |-src

我需要上传文件,在不同的文件夹同名,递归到一个远程文件夹。这里有一个例子

Local
   |-app1-1  
   |      |-src
   |      |-img
   |      |-static
   |          |-app1-2      <------Upload from this
   |              |-file1-1
   |              |-file1-2
   |-app2-1  
   |      |-src
   |      |-img
   |      |-static
   |          |-app2-2      <------Upload from this
   |              |-file2-1
   |              |-file2-2
但这会产生一个不理想的输出:

Remote Result
  |-folder1
  |-folder2
  |-folder3
  |-static
  |    |-app1-1      <------Upload from this
  |    |     |-static
  |    |         |-app1-2
  |    |            |-file1
  |    |            |-file2

  ...... (Same other folder)
远程结果
|-折叠1
|-折叠2
|-折页3
|-静止的
||-app1-1
  - >
  lftp
  -e "mirror
  --include ^static/
  --exclude ^\.git.*
  -eRv $CI_PROJECT_DIR Remote Result/static; quit;"
  sftp://$CREDENTIALS
Remote Result
  |-folder1
  |-folder2
  |-folder3
  |-static
  |    |-app1-1      <------Upload from this
  |    |     |-static
  |    |         |-app1-2
  |    |            |-file1
  |    |            |-file2

  ...... (Same other folder)