MAJRO CHANGES!@!!@#
This commit is contained in:
@@ -71,6 +71,27 @@ namespace dropshell
|
||||
return execute_local_command("", rsync_cmd, {}, nullptr, (silent ? cMode::Silent : cMode::Defaults));
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// rsync_file_to_remote : SHARED COMMAND
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
bool rsync_file_to_remote(
|
||||
const std::string &local_path,
|
||||
const std::string &remote_path,
|
||||
const ServerConfig &server_env,
|
||||
bool silent,
|
||||
std::string user)
|
||||
{
|
||||
ASSERT(!local_path.empty() && !remote_path.empty(), "Local or remote path not specified. Can't rsync.");
|
||||
ASSERT(std::filesystem::is_block_file(local_path), "Local path is not a file. Can't rsync.");
|
||||
|
||||
std::string rsync_cmd = "rsync --mkpath -zpc -e 'ssh -p " + server_env.get_SSH_PORT() + "' " +
|
||||
quote(local_path) + " " +
|
||||
quote(user + "@" + server_env.get_SSH_HOST() + ":" +
|
||||
remote_path);
|
||||
return execute_local_command("", rsync_cmd, {}, nullptr, (silent ? cMode::Silent : cMode::Defaults));
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// get_arch : SHARED COMMAND
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user