Changeset 495 for devel/pb/bin/pb


Ignore:
Timestamp:
Jul 10, 2008, 11:36:18 AM (12 years ago)
Author:
Bruno Cornec
Message:
  • all global variables are prefixed with pb
  • First attempt at using locale and gettext
  • use of pb_display and pb_display_init added
  • Update presentation following RMLL 2008
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r494 r495  
    339339}
    340340if (defined $opts{'v'}) {
    341     $debug = $opts{'v'};
     341    $pbdebug = $opts{'v'};
    342342}
    343343if (defined $opts{'f'}) {
     
    345345}
    346346if (defined $opts{'q'}) {
    347     $debug=-1;
     347    $pbdebug=-1;
    348348}
    349349if (defined $opts{'l'}) {
    350     open(LOG,"> $opts{'l'}") || die "Unable to log to $opts{'l'}: $!";
    351     $LOG = \*LOG;
    352     $debug = 0  if ($debug == -1);
    353     }
    354 pb_log_init($debug, $LOG);
     350    open(pbLOG,"> $opts{'l'}") || die "Unable to log to $opts{'l'}: $!";
     351    $pbLOG = \*pbLOG;
     352    $pbdebug = 0  if ($pbdebug == -1);
     353    }
     354pb_log_init($pbdebug, $pbLOG);
     355pb_display_init("text","");
    355356
    356357# Handle root of the project if defined
     
    15281529use File::Copy;
    15291530
    1530 our $debug;
    1531 our $LOG;
    1532 our $synmsg = "pbscript";
    1533 pb_log_init($debug, $LOG);
     1531our $pbdebug;
     1532our $pbLOG;
     1533our $pbsynmsg = "pbscript";
     1534pb_log_init($pbdebug, $pbLOG);
    15341535pb_temp_init();
    15351536
     
    17741775        pb_system("emerge wget sudo ntp DateManip File-MimeInfo","$cmtall");
    17751776} else {
    1776     print "No pkg to install\n";
     1777    pb_log(0,"No pkg to install\n");
    17771778}
    17781779EOF
     
    18391840    # Get subject line
    18401841    my $sl = "Project $ENV{'PBPROJ'} version $ENV{'PBPROJVER'} is now available";
    1841     print "Please enter the title of your announce\n";
    1842     print "(By default: $sl)\n";
     1842    pb_log(0,"Please enter the title of your announce\n");
     1843    pb_log(0,"(By default: $sl)\n");
    18431844    my $sl2 = <STDIN>;
    18441845    $sl = $sl2 if ($sl2 !~ /^$/);
Note: See TracChangeset for help on using the changeset viewer.