summaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2010-08-01 11:36:28 +0000
committerIan Lynagh <igloo@earth.li>2010-08-01 11:36:28 +0000
commit20c633b040a53166431744a8b0a0f8bf440835d6 (patch)
tree9399c194af367e387630adb96be350dc2bd8d1db /boot
parentfa926e2e47c1a3e02e37e5446802e831e1b9ac7c (diff)
downloadhaskell-20c633b040a53166431744a8b0a0f8bf440835d6.tar.gz
Add more error checking to the boot script
Diffstat (limited to 'boot')
-rw-r--r--boot13
1 files changed, 8 insertions, 5 deletions
diff --git a/boot b/boot
index 70d99e692a..39e8cd12d5 100644
--- a/boot
+++ b/boot
@@ -11,7 +11,8 @@ system("/usr/bin/perl", "-w", "boot-pkgs") == 0
my $dir;
my $curdir;
-$curdir = &cwd();
+$curdir = &cwd()
+ or die "Can't find current directory: $!";
# Check that we have all boot packages.
open PACKAGES, "< packages";
@@ -45,13 +46,15 @@ close PACKAGES;
foreach $dir (".", glob("libraries/*/")) {
if (-f "$dir/configure.ac") {
print "Booting $dir\n";
- chdir $dir;
- system "autoreconf";
- chdir $curdir;
+ chdir $dir or die "can't change to $dir: $!";
+ system("autoreconf") == 0
+ or die "Running autoreconf failed with exitcode $?";
+ chdir $curdir or die "can't change to $curdir: $!";
}
}
# Alas, darcs doesn't handle file permissions, so fix a few of them.
for my $file ("boot", "darcs-all", "push-all", "validate") {
- chmod 0755, $file if -f $file;
+ chmod 0755, $file if -f $file
+ or die "Can't chmod 0755 $file: $!";
}