IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 13, 2012, 5:55:50 PM (14 years ago)
Author:
eugene
Message:

add modes to (a) copy original .bck data to backup host and (b) set the bit to use the backup host for some data

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20111122/Ohana/src/photdbc/src/initialize_dvodist.c

    r33404 r33518  
    2020  fprintf (stderr, " -v : verbose mode\n");
    2121  fprintf (stderr, " -params : list the current parameters\n\n");
     22
     23  fprintf (stderr, " -out-backup (host1) to (host2) : move *.bck files for host1 to host2\n");
     24  fprintf (stderr, " -use-backup (host1) : use the backup file for host1\n");
    2225
    2326  exit (2);
     
    8184    remove_argument (N, &argc, argv);
    8285  }
     86  if ((N = get_argument (argc, argv, "-out-backup"))) {
     87    if (MODE) {
     88      fprintf (stderr, "ERROR: cannot use -fix with -in or -out options!\n");
     89      usage();
     90    }
     91    // usage dvodist -out-backup (srcHost) to (dstHost)
     92    MODE = MODE_OUT_BACKUP;
     93    remove_argument (N, &argc, argv);
     94    srcHostname = strcreate (argv[N]);
     95    remove_argument (N, &argc, argv);
     96    remove_argument (N, &argc, argv); // remove 'to'
     97    dstHostname = strcreate (argv[N]);
     98    remove_argument (N, &argc, argv);
     99  }
     100  if ((N = get_argument (argc, argv, "-use-backup"))) {
     101    if (MODE) {
     102      fprintf (stderr, "ERROR: cannot use -fix with -in or -out options!\n");
     103      usage();
     104    }
     105    // usage dvodist -out-backup (srcHost) to (dstHost)
     106    MODE = MODE_OUT_BACKUP;
     107    remove_argument (N, &argc, argv);
     108    srcHostname = strcreate (argv[N]);
     109    remove_argument (N, &argc, argv);
     110  }
    83111  if (!MODE) usage();
    84112
Note: See TracChangeset for help on using the changeset viewer.