# HG changeset patch # User wenzelm # Date 1717251995 -7200 # Node ID cce5670be9f92d8c0e4db982b7cd645057ff1cc4 # Parent 4ac6324a651b872d6e896fc5b109f3961e03ca58 support "rsync --chmod --chown" via Rsync.Context; diff -r 4ac6324a651b -r cce5670be9f9 src/Pure/General/rsync.scala --- a/src/Pure/General/rsync.scala Sat Jun 01 16:19:14 2024 +0200 +++ b/src/Pure/General/rsync.scala Sat Jun 01 16:26:35 2024 +0200 @@ -12,17 +12,21 @@ def apply( progress: Progress = new Progress, ssh: SSH.System = SSH.Local, + chmod: String = "", + chown: String = "", archive: Boolean = true, stats: Boolean = true ): Context = { val directory = Components.provide(Component_Rsync.home, ssh = ssh, progress = progress) - new Context(directory, progress, archive, stats) + new Context(directory, progress, chmod, chown, archive, stats) } } final class Context private( directory: Components.Directory, val progress: Progress, + chmod: String, + chown: String, archive: Boolean, stats: Boolean ) { @@ -36,6 +40,8 @@ File.bash_path(Component_Rsync.local_program) + " --secluded-args" + if_proper(ssh_command, " --rsh=" + Bash.string(ssh_command)) + " --rsync-path=" + Bash.string(quote(File.standard_path(program))) + + if_proper(chmod, " --chmod=" + Bash.string(chmod)) + + if_proper(chown, " --chown=" + Bash.string(chown)) + if_proper(archive, " --archive") + if_proper(stats, " --stats") }