IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30601


Ignore:
Timestamp:
Feb 13, 2011, 11:07:28 AM (15 years ago)
Author:
eugene
Message:

add option to start build after a named module; complain if we cannot find a named module

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psconfig/psbuild

    r29559 r30601  
    1313$operations = 0;
    1414$start = "";
     15$start_after = "";
    1516$stop = "";
    1617$verbose = 0;
     
    8586    }
    8687    if ($ARGV[0] eq "-only") {
     88        if ($start || $stop || $start_after) { die "do not mix -only (-start, -stop) or (-after, -stop)\n"; }
    8789        $start = $ARGV[1];
    8890        $stop = $ARGV[1];
     
    9092    }
    9193    if ($ARGV[0] eq "-start") {
     94        if ($start || $start_after) { die "do not mix -only (-start, -stop) or (-after, -stop)\n"; }
    9295        $start = $ARGV[1];
    9396        shift; shift; next;
    9497    }
     98    if ($ARGV[0] eq "-after") {
     99        if ($start || $start_after) { die "do not mix -only (-start, -stop) or (-after, -stop)\n"; }
     100        $start_after = $ARGV[1];
     101        $start = "INVALID_VALUE"; # need to have a value to skip earlier entries
     102        shift; shift; next;
     103    }
    95104    if ($ARGV[0] eq "-stop") {
     105        if ($stop) { die "do not mix -only (-start, -stop) or (-after, -stop)\n"; }
    96106        $stop = $ARGV[1];
    97107        shift; shift; next;
     
    258268    $stop_now = 0;
    259269    for ($i = 0; !$stop_now && ($i < @module); $i++) {
    260         if (($stop ne "") && ($stop eq $module[$i])) { $stop_now = 1; }
    261         if (($start ne "") && ($start ne $module[$i])) { next; }
     270        if ($stop && ($stop eq $module[$i])) { $stop_now = 1; }
     271        if ($start_after && ($start_after eq $module[$i])) { $start = $module[$i+1]; next; }
     272        if ($start && ($start ne $module[$i])) { next; }
    262273        $start = "";
    263274
     
    348359        chdir $homedir;
    349360    }
     361    if ($start) { if ($start_after) { $start = $start_after; } &failure($start, "unknown -start or -after module $start\n"); }
     362    if ($stop && !$stop_now) { &failure($start, "unknown -stop module $stop\n"); }
     363
    350364    print "\033]0; ** psbuild: finished ** \007";
    351365    exit 0;
Note: See TracChangeset for help on using the changeset viewer.