updated the usage info
[rsync/rsync.git] / options.c
index 434defd..42b8a21 100644 (file)
--- a/options.c
+++ b/options.c
@@ -55,6 +55,7 @@ int am_sender=0;
 int recurse = 0;
 int am_daemon=0;
 int am_client=0;
+int do_stats=0;
 
 int block_size=BLOCK_SIZE;
 
@@ -74,9 +75,12 @@ void usage(int F)
 {
   rprintf(F,"rsync version %s Copyright Andrew Tridgell and Paul Mackerras\n\n",
          VERSION);
-  rprintf(F,"Usage:\t%s [options] src user@host:dest\nOR",RSYNC_NAME);
-  rprintf(F,"\t%s [options] user@host:src dest\n\n",RSYNC_NAME);
-  rprintf(F,"Options:\n");
+  rprintf(F,"Usage:\t%s [options] src user@host:dest\n",RSYNC_NAME);
+  rprintf(F,"OR\t%s [options] user@host:src dest\n",RSYNC_NAME);
+  rprintf(F,"OR\t%s [options] src dest\n",RSYNC_NAME);
+  rprintf(F,"OR\t%s [options] user@host::src dest\n",RSYNC_NAME);
+  rprintf(F,"OR\t%s [options] src user@host::dest\n",RSYNC_NAME);
+  rprintf(F,"\nOptions:\n");
   rprintf(F,"-v, --verbose            increase verbosity\n");
   rprintf(F,"-c, --checksum           always checksum\n");
   rprintf(F,"-a, --archive            archive mode\n");
@@ -115,17 +119,21 @@ void usage(int F)
   rprintf(F,"    --version            print version number\n");  
   rprintf(F,"    --daemon             run as a rsync daemon\n");  
   rprintf(F,"    --config FILE        specify alternate rsyncd.conf file\n");  
-  rprintf(F,"    --port PORT          specify alternate rsyncd port number\n");  
+  rprintf(F,"    --port PORT          specify alternate rsyncd port number\n");
+  rprintf(F,"    --stats              give some file transfer stats\n");  
 
   rprintf(F,"\n");
   rprintf(F,"the backup suffix defaults to %s\n",BACKUP_SUFFIX);
   rprintf(F,"the block size defaults to %d\n",BLOCK_SIZE);  
+
+  rprintf(F,"\nPlease see the rsync(1) and rsyncd.conf(5) man pages for full documentation\n");
+  rprintf(F,"See http://samba.anu.edu.au/rsync/ for updates and bug reports\n");
 }
 
 enum {OPT_VERSION,OPT_SUFFIX,OPT_SENDER,OPT_SERVER,OPT_EXCLUDE,
       OPT_EXCLUDE_FROM,OPT_DELETE,OPT_NUMERIC_IDS,OPT_RSYNC_PATH,
       OPT_FORCE,OPT_TIMEOUT,OPT_DAEMON,OPT_CONFIG,OPT_PORT,
-      OPT_INCLUDE, OPT_INCLUDE_FROM};
+      OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_STATS};
 
 static char *short_options = "oblLWHpguDCtcahvrRIxnSe:B:T:z";
 
@@ -170,6 +178,7 @@ static struct option long_options[] = {
   {"temp-dir",    1,     0,    'T'},
   {"compress",   0,     0,    'z'},
   {"daemon",      0,     0,    OPT_DAEMON},
+  {"stats",       0,     0,    OPT_STATS},
   {"config",      1,     0,    OPT_CONFIG},
   {"port",        1,     0,    OPT_PORT},
   {0,0,0,0}};
@@ -364,6 +373,10 @@ void parse_arguments(int argc, char *argv[])
                am_daemon = 1;
                break;
 
+       case OPT_STATS:
+               do_stats = 1;
+               break;
+
        case OPT_CONFIG:
                config_file = optarg;
                break;