mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-02-19 07:34:44 -05:00
Add support for optional ":PORT" in rsync URL.
This commit is contained in:
6
main.c
6
main.c
@@ -464,6 +464,7 @@ static int start_client(int argc, char *argv[])
|
||||
extern int local_server;
|
||||
extern int am_sender;
|
||||
extern char *shell_cmd;
|
||||
extern int rsync_port;
|
||||
|
||||
if (strncasecmp(URL_PREFIX, argv[0], strlen(URL_PREFIX)) == 0) {
|
||||
char *host, *path;
|
||||
@@ -476,6 +477,11 @@ static int start_client(int argc, char *argv[])
|
||||
} else {
|
||||
path="";
|
||||
}
|
||||
p = strchr(host,':');
|
||||
if (p) {
|
||||
rsync_port = atoi(p+1);
|
||||
*p = 0;
|
||||
}
|
||||
return start_socket_client(host, path, argc-1, argv+1);
|
||||
}
|
||||
|
||||
|
||||
@@ -88,6 +88,7 @@ void usage(int F)
|
||||
rprintf(F," or rsync [OPTION]... SRC DEST\n");
|
||||
rprintf(F," or rsync [OPTION]... [USER@]HOST::SRC DEST\n");
|
||||
rprintf(F," or rsync [OPTION]... SRC [USER@]HOST::DEST\n");
|
||||
rprintf(F," or rsync [OPTION]... rsync://HOST[:PORT]/SRC DEST\n");
|
||||
rprintf(F,"\nOptions\n");
|
||||
rprintf(F," -v, --verbose increase verbosity\n");
|
||||
rprintf(F," -c, --checksum always checksum\n");
|
||||
@@ -122,9 +123,9 @@ void usage(int F)
|
||||
rprintf(F," -T --temp-dir=DIR create temporary files in directory DIR\n");
|
||||
rprintf(F," --compare-dest=DIR also compare destination files relative to DIR\n");
|
||||
rprintf(F," -z, --compress compress file data\n");
|
||||
rprintf(F," --exclude=PATTERN exclude file FILE\n");
|
||||
rprintf(F," --exclude=PATTERN exclude files matching PATTERN\n");
|
||||
rprintf(F," --exclude-from=FILE exclude patterns listed in FILE\n");
|
||||
rprintf(F," --include=PATTERN don't exclude file FILE\n");
|
||||
rprintf(F," --include=PATTERN don't exclude files matching PATTERN\n");
|
||||
rprintf(F," --include-from=FILE don't exclude patterns listed in FILE\n");
|
||||
rprintf(F," --suffix=SUFFIX override backup suffix\n");
|
||||
rprintf(F," --version print version number\n");
|
||||
|
||||
11
rsync.yo
11
rsync.yo
@@ -13,7 +13,7 @@ rsync [options] [user@]host::module[/path] path
|
||||
|
||||
rsync [options] path [user@]host::module[/path]
|
||||
|
||||
rsync [options] rsync://host/module/path path
|
||||
rsync [options] rsync://host[:port]/module/path path
|
||||
|
||||
manpagedescription()
|
||||
|
||||
@@ -208,6 +208,7 @@ Usage: rsync [OPTION]... SRC [USER@]HOST:DEST
|
||||
or rsync [OPTION]... SRC DEST
|
||||
or rsync [OPTION]... [USER@]HOST::SRC DEST
|
||||
or rsync [OPTION]... SRC [USER@]HOST::DEST
|
||||
or rsync [OPTION]... rsync://HOST[:PORT]/SRC DEST
|
||||
|
||||
Options
|
||||
-v, --verbose increase verbosity
|
||||
@@ -243,10 +244,10 @@ Options
|
||||
-T --temp-dir=DIR create temporary files in directory DIR
|
||||
--compare-dest=DIR also compare destination files relative to DIR
|
||||
-z, --compress compress file data
|
||||
--exclude=PATTERN exclude file FILE
|
||||
--exclude-from=PATTERN exclude files listed in FILE
|
||||
--include=PATTERN don't exclude file FILE
|
||||
--include-from=PATTERN don't exclude files listed in FILE
|
||||
--exclude=PATTERN exclude files matching PATTERN
|
||||
--exclude-from=FILE exclude files listed in FILE
|
||||
--include=PATTERN don't exclude files matching PATTERN
|
||||
--include-from=FILE don't exclude files listed in FILE
|
||||
--suffix=SUFFIX override backup suffix
|
||||
--version print version number
|
||||
--daemon run as a rsync daemon
|
||||
|
||||
Reference in New Issue
Block a user