--- /dev/null
+#!/usr/bin/perl
+
+use warnings;
+use strict;
+
+use Config;
+use Term::ANSIColor ':constants';
+my $CRST = RESET;
+my $CCODE = BOLD;
+my $CSTAT = BOLD . GREEN;
+my $CCORE = BOLD . CYAN;
+my $CSIG = CYAN;
+
+if (@ARGV) {
+ my $code = system (@ARGV);
+
+ if ($code < 0) {
+ exit 127;
+ }
+ elsif ($code > 0) {
+
+ my $status = $code >> 8;
+ my $signum = $code & 127;
+ my $core = $code & 128;
+
+ my %sig_idx;
+ @sig_idx{split /\s+/, $Config{sig_num}} = split /\s/, $Config{sig_name};
+
+ printf STDERR (
+<<EOF
+
+Results of execution: `%s`
+----------------------
+System exit code:$CCODE %d $CRST$CSIG %s $CRST
+ ($CSTAT%08b$CRST$CCORE%b$CRST$CSIG%07b$CRST)
+
+Status: %3s ($CSTAT%08b$CRST)
+Signal: %3s ($CSIG%08b$CRST)
+Core: %3s
+----------------------
+EOF
+ , (join ' ', @ARGV),
+ $code, ($signum ? "(SIG-$sig_idx{$signum})" : ''),
+ $status, $core, $signum,
+ ($status) x 2,
+ ($signum) x 2,
+ ($core ? 'Yes': 'No')
+ );
+
+ exit ($status);
+ }
+}
CPAN::Config->commit;
"
run_or_err "Configuring CPAN.pm" "perl -e '$CPAN_CFG_SCRIPT'"
+
+echo_err "
+===================== PERL CONFIGURATION COMPLETE =====================
+
+= CPUinfo
+$(perl -0777 -p -e 's/.+\n\n(?!\z)//s' < /proc/cpuinfo)
+
+= Meminfo
+$(free -m -t)
+
+= Diskinfo
+$(sudo df -h)
+
+$(mount | grep '^/')
+
+= Kernel info
+$(uname -a)
+
+= Network Configuration
+$(ip addr)
+
+= Network Sockets Status
+$(sudo netstat -an46p | grep -Pv '\s(CLOSING|(FIN|TIME|CLOSE)_WAIT.?|LAST_ACK)\s')
+
+= Processlist
+$(sudo ps fuxa)
+============================================================================="
===================== DEPENDENCY CONFIGURATION COMPLETE =====================
$(tstamp) Configuration phase seems to have taken $(date -ud "@$SECONDS" '+%H:%M:%S') (@$SECONDS)
-= CPUinfo
-$(perl -0777 -p -e 's/.+\n\n(?!\z)//s' < /proc/cpuinfo)
-
= Meminfo
$(free -m -t)
-= Kernel info
-$(uname -a)
-
-= Network Configuration
-$(ip addr)
+= Diskinfo
+$(sudo df -h)
-= Network Sockets Status
-$(sudo netstat -an46p | grep -Pv '\s(CLOSING|(FIN|TIME|CLOSE)_WAIT.?|LAST_ACK)\s')
+$(mount | grep '^/')
= Environment
$(env | grep -P 'TEST|HARNESS|MAKE|TRAVIS|PERL|DBIC' | LC_ALL=C sort | cat -v)
"echo \\
\"$MODLIST\" \\
| xargs -d '\\n' -n 1 -P $NUMTHREADS bash -c \\
- 'OUT=\$($TIMEOUT_CMD cpanm --notest \"\$@\" 2>&1 ) || (LASTEXIT=\$?; echo \"\$OUT\"; exit \$LASTEXIT)' \\
+ 'OUT=\$(maint/getstatus $TIMEOUT_CMD cpanm --notest \"\$@\" 2>&1 ) || (LASTEXIT=\$?; echo \"\$OUT\"; exit \$LASTEXIT)' \\
'giant space monkey penises'
"
}