fixed the error message length while ./configure fails.

This commit is contained in:
agentzh (章亦春) 2011-11-15 12:03:24 +08:00
parent 099c040870
commit a5ac948dfe
2 changed files with 9 additions and 2 deletions

9
util/configure vendored
View File

@ -11,6 +11,7 @@ sub env ($$);
sub cd ($);
sub auto_complete ($);
sub usage ($);
sub trim ($);
my (@make_cmds, @make_install_cmds);
@ -272,10 +273,16 @@ sub shell ($@) {
unless ($dry_run) {
system($cmd) == 0 or
die "failed to run command: $cmd\n";
die "failed to run command: ", trim($cmd), "\n";
}
}
sub trim ($) {
my $cmd = shift;
$cmd =~ s/\n.*/.../s;
$cmd;
}
sub auto_complete ($) {
my $name = shift;
my @dirs = glob "$name-[0-9]*" or

View File

@ -1,7 +1,7 @@
#!/bin/bash
main_ver=1.0.9
minor_ver=9
minor_ver=11
version=$main_ver.$minor_ver
echo $version