Changeset 1583


Ignore:
Timestamp:
May 24, 2012, 12:07:15 AM (8 years ago)
Author:
Bruno Cornec
Message:
  • option -h can now be passed multiple times. one provides synopsis, two gives full help.
  • Move message indicating end of build earlier, so that packages to install are back at the end.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r1564 r1583  
    644644pb_syntax_init("$appname (aka project-builder.org) Version $projectbuilderver-$projectbuilderrev\n");
    645645
    646 GetOptions("help|?|h" => \$opts{'h'},
     646GetOptions("help|?|h+" => \$opts{'h'},
    647647        "man" => \$opts{'man'},
    648648        "verbose|v+" => \$opts{'v'},
     
    666666) || pb_syntax(-1,0);
    667667
    668 if (defined $opts{'h'}) {
    669     pb_syntax(0,1);
    670 }
    671 if (defined $opts{'man'}) {
    672     pb_syntax(0,2);
    673 }
    674 if (defined $opts{'v'}) {
    675     $pbdebug = $opts{'v'};
    676 }
    677 if (defined $opts{'f'}) {
    678     $pbforce=1;
    679 }
    680 if (defined $opts{'q'}) {
    681     $pbdebug=-1;
    682 }
    683 if (defined $opts{'S'}) {
    684     $pbsnap=1;
    685 }
    686 if (defined $opts{'k'}) {
    687     $pbkeep=1;
    688 }
    689668if (defined $opts{'l'}) {
    690669    open(pbLOG,"> $opts{'l'}") || die "Unable to log to $opts{'l'}: $!";
     
    693672    }
    694673pb_log_init($pbdebug, $pbLOG);
     674
     675if (defined $opts{'h'}) {
     676    pb_syntax(0,$opts{'h'}-1);
     677}
     678if (defined $opts{'man'}) {
     679    pb_syntax(0,2);
     680}
     681if (defined $opts{'v'}) {
     682    $pbdebug = $opts{'v'};
     683}
     684if (defined $opts{'f'}) {
     685    $pbforce=1;
     686}
     687if (defined $opts{'q'}) {
     688    $pbdebug=-1;
     689}
     690if (defined $opts{'S'}) {
     691    $pbsnap=1;
     692}
     693if (defined $opts{'k'}) {
     694    $pbkeep=1;
     695}
    695696pb_display_init("text","");
    696697
     
    17391740    # Sign packages
    17401741    pb_sign_pkgs($pbos,$made);
     1742    pb_log(0,"INFO: ------ Finished building package ------\n");
    17411743
    17421744    # Find the appropriate check cmd/opts
     
    17801782    print KEEP "$made\n";
    17811783    close(KEEP);
    1782     pb_log(0,"INFO: ------ Finished building package ------\n");
    17831784}
    17841785
Note: See TracChangeset for help on using the changeset viewer.