class RSync
Definitions
def escape(command)
This escapes the -e argument to rsync, as it's argv parser is a bit.. unique.
Implementation
def escape(command)
case command
when Array
command.collect{|arg| escape(arg)}.join(" ")
when String
command =~ /\s|"|'/ ? command.dump : command
else
escape(command.to_s)
end
end