Document choice of script exit code

This commit is contained in:
Manuel Pégourié-Gonnard 2017-10-26 09:47:36 +02:00
parent 19773ff835
commit 254eec8bb4
5 changed files with 5 additions and 0 deletions

View file

@ -36,6 +36,7 @@ my @curves = split( /\s+/, `sed -n -e '$sed_cmd' $config_h` );
system( "cp $config_h $config_h.bak" ) and die; system( "cp $config_h $config_h.bak" ) and die;
sub abort { sub abort {
system( "mv $config_h.bak $config_h" ) and warn "$config_h not restored\n"; system( "mv $config_h.bak $config_h" ) and warn "$config_h not restored\n";
# use an exit code between 1 and 124 for git bisect (die returns 255)
warn $_[0]; warn $_[0];
exit 1; exit 1;
} }

View file

@ -45,6 +45,7 @@ my @hashes = split( /\s+/,
system( "cp $config_h $config_h.bak" ) and die; system( "cp $config_h $config_h.bak" ) and die;
sub abort { sub abort {
system( "mv $config_h.bak $config_h" ) and warn "$config_h not restored\n"; system( "mv $config_h.bak $config_h" ) and warn "$config_h not restored\n";
# use an exit code between 1 and 124 for git bisect (die returns 255)
warn $_[0]; warn $_[0];
exit 1; exit 1;
} }

View file

@ -60,6 +60,7 @@ my %algs = (
system( "cp $config_h $config_h.bak" ) and die; system( "cp $config_h $config_h.bak" ) and die;
sub abort { sub abort {
system( "mv $config_h.bak $config_h" ) and warn "$config_h not restored\n"; system( "mv $config_h.bak $config_h" ) and warn "$config_h not restored\n";
# use an exit code between 1 and 124 for git bisect (die returns 255)
warn $_[0]; warn $_[0];
exit 1; exit 1;
} }

View file

@ -33,6 +33,7 @@ my @kexes = split( /\s+/, `sed -n -e '$sed_cmd' $config_h` );
system( "cp $config_h $config_h.bak" ) and die; system( "cp $config_h $config_h.bak" ) and die;
sub abort { sub abort {
system( "mv $config_h.bak $config_h" ) and warn "$config_h not restored\n"; system( "mv $config_h.bak $config_h" ) and warn "$config_h not restored\n";
# use an exit code between 1 and 124 for git bisect (die returns 255)
warn $_[0]; warn $_[0];
exit 1; exit 1;
} }

View file

@ -55,6 +55,7 @@ my $config_h = 'include/mbedtls/config.h';
system( "cp $config_h $config_h.bak" ) and die; system( "cp $config_h $config_h.bak" ) and die;
sub abort { sub abort {
system( "mv $config_h.bak $config_h" ) and warn "$config_h not restored\n"; system( "mv $config_h.bak $config_h" ) and warn "$config_h not restored\n";
# use an exit code between 1 and 124 for git bisect (die returns 255)
warn $_[0]; warn $_[0];
exit 1; exit 1;
} }