Changeset 36282


Ignore:
Timestamp:
2022-07-04T12:14:49+12:00 (5 months ago)
Author:
kjdon
Message:

print out a message if the file to source is not found, also use -e for file exists, rather than exists, for the string is defined. exit if its not found - this makes sense for the situation I am testing, hope it makes sense everywhere...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gs-release-builder/envi/lib/util.pl

    r36212 r36282  
    11use File::Basename;
     2
    23
    34#envi messages
     
    218219            my ($name, $value) = split(/=/,$line,2);
    219220            if ( $name !~ /^\_/ ) {
    220                 $ENV{$name} = $value;
     221                $ENV{$name} = $value;
    221222            }
    222223        } elsif ( $line eq "-- ENVIRONMENT \"$rnd\" --" ) {
     
    228229
    229230sub source_bash_script {
    230     if ( ! exists $_[0] ) { return; }
     231    if ( ! -e $_[0] ) { print "Script $_[0] not found\n"; exit; }
    231232    source_script("bash","$_[0]");
    232233}
    233234
    234235sub source_batch_script {
    235     if ( ! exists $_[0] ) { return; }
     236    if ( ! -e $_[0] ) { print "Script $_[0] not found\n";  exit; }
    236237    source_script("bat","$_[0]");
    237238}
Note: See TracChangeset for help on using the changeset viewer.