summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2020-01-18 14:03:18 +0000
committerSadie Powell <sadie@witchery.services>2020-01-18 14:25:03 +0000
commit87471ab92dc4c0089d021db3faa27ed2f929fb6b (patch)
tree681fc5f4e988d1342d381bf8af6b8285252a008a /tools
parent04b5090a2f65a2e3380a32e5cd0b4936716ec394 (diff)
Add a function for showing a command whilst executing it.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/mkheaders3
-rwxr-xr-xtools/test-build10
2 files changed, 7 insertions, 6 deletions
diff --git a/tools/mkheaders b/tools/mkheaders
index 4b1f370f3..ee8142d3b 100755
--- a/tools/mkheaders
+++ b/tools/mkheaders
@@ -37,6 +37,7 @@ use List::Util qw(uniq);
use POSIX qw(strftime);
use lib dirname $RealDir;
+use make::common;
use make::console;
my @ignored_revisions = (
@@ -144,7 +145,7 @@ for my $path (@paths) {
}
}
-system 'git', 'commit',
+execute 'git', 'commit',
'--author', 'InspIRCd Robot <noreply@inspircd.org>',
'--message', 'Update copyright headers.',
'--', @updated;
diff --git a/tools/test-build b/tools/test-build
index 48988b687..eb7da05d0 100755
--- a/tools/test-build
+++ b/tools/test-build
@@ -40,7 +40,7 @@ use make::configure;
$ENV{INSPIRCD_DEBUG} = 3;
$ENV{INSPIRCD_VERBOSE} = 1;
-system 'git', 'clean', '-dfx';
+execute 'git', 'clean', '-dfx';
my @compilers = $#ARGV >= 0 ? @ARGV : qw(g++ clang++ icpc);
foreach my $compiler (@compilers) {
@@ -57,19 +57,19 @@ foreach my $compiler (@compilers) {
say "Attempting to build using the $compiler compiler and the $socketengine socket engine...";
my @configure_flags;
if (defined $ENV{TEST_BUILD_MODULES}) {
- system './configure', '--enable-extras', $ENV{TEST_BUILD_MODULES};
+ execute './configure', '--enable-extras', $ENV{TEST_BUILD_MODULES};
push @configure_flags, '--disable-auto-extras';
}
- if (system './configure', '--development', '--socketengine', $socketengine, @configure_flags) {
+ if (execute './configure', '--development', '--socketengine', $socketengine, @configure_flags) {
say "Failed to configure using the $compiler compiler and the $socketengine socket engine!";
exit 1;
}
- if (system 'make', '--jobs', get_cpu_count, 'install') {
+ if (execute 'make', '--jobs', get_cpu_count, 'install') {
say "Failed to compile using the $compiler compiler and the $socketengine socket engine!";
exit 1;
}
say "Building using the $compiler compiler and the $socketengine socket engine succeeded!";
}
- system 'git', 'clean', '-dfx';
+ execute 'git', 'clean', '-dfx';
}