Changeset - feebc1df83c1
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 15 years ago 2010-07-25 17:36:54
ohnobinki@ohnopublishing.net
Exit if -h is passed.
1 file changed with 1 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/client/distren.c
Show inline comments
 
@@ -66,52 +66,49 @@ int main(int argc, char *argv[])
 
  input = NULL;
 
  output = NULL;
 
  joburi = NULL;
 

	
 
  while(-1 != (curopt = getopt(argc, argv, "di:j:o:u:p:h")))
 
    {
 
      switch(curopt)
 
	{
 
	case ':':
 
	  fprintf(stderr, "-%c: is missing an argument\n", optopt);
 
	  return 1;
 

	
 
	case '?':
 
	  fprintf(stderr, "-%c: invalid option specified\n", optopt);
 
	  return 1;
 

	
 
	case 'h':
 
	  fprintf(stderr, "Usage: %s [-u <username>] [-p <password>] ...\n", argv[0]);
 
	  fprintf(stderr, "\t-i\tSpecifies an input file to submit to the server.\n\
 
\t-o\tSpecifies the name that should be given to a job retrieved from the server.\n\
 
\t-j\tSpecifies the job handle of a job to view information about or retrieve.\n\
 
\t-d\tDisplays information about the job specified with -j or uploaded by -i.\n\
 
\t-h\tShows this help message.\n");
 
	  
 
	  /*
 
	   * don't return here because options_init will have an
 
	   * overall options help page
 
	   */
 
	  return 0;
 
	  break;
 

	
 
	case 'u':
 
	  main_opt_set("-u", &username, optarg);
 
	  dologin = 1;
 
	  break;
 

	
 
	case 'p':
 
	  main_opt_set("-p", &password, optarg);
 
	  dologin = 1;
 
	  break;
 

	
 
	case 'i':
 
	  if(joburi)
 
	    {
 
	      fprintf(stderr, "You may not specify both -i and -j; -j must refer to an existing job URL and -i will create a new job and thus retrieve its URL.\n");
 
	      return 1;
 
	    }
 
	  main_opt_set("-i", &input, optarg);
 
	  break;
 

	
 
	case 'o':
 
	  main_opt_set("-o", &output, optarg);
 
	  break;
0 comments (0 inline, 0 general)