For MONC, it would be preferable to copy a single (source) file from the root directory (to avoid a long list of directories to exclude). Unfortunately, Fab cannot run grab_folder on a single file, since the underlying rsync command adds a / add the end of the source (to avoid creating an unnecessary directory layer).
Suggested approach:
- Only add
/ in rsync if the source is indeed a directory.
- Change the name from
grab_folder to (e.g.) grab_files (or we could add a separate 'grab_file`, but that feels like unnecessary code duplication), to better indicate that this can be used for directories and file(s) . Backwards compatibility should be maintained (with a deprecation warning)
For MONC, it would be preferable to copy a single (source) file from the root directory (to avoid a long list of directories to exclude). Unfortunately, Fab cannot run
grab_folderon a single file, since the underlyingrsynccommand adds a/add the end of the source (to avoid creating an unnecessary directory layer).Suggested approach:
/inrsyncif the source is indeed a directory.grab_folderto (e.g.)grab_files(or we could add a separate 'grab_file`, but that feels like unnecessary code duplication), to better indicate that this can be used for directories and file(s) . Backwards compatibility should be maintained (with a deprecation warning)