summaryrefslogtreecommitdiff
path: root/packaging/SGI/spec.pl
diff options
context:
space:
mode:
authorHerb Lewis <herb@samba.org>1997-12-01 14:50:52 +0000
committerHerb Lewis <herb@samba.org>1997-12-01 14:50:52 +0000
commitb7e1265f106010e03d92575f4578162ec659994b (patch)
tree20dccc53aea7ea16c39976fc0997d6c6a1afc772 /packaging/SGI/spec.pl
parente57275dd193d648458293b25f0cc3c7179f26536 (diff)
downloadsamba-b7e1265f106010e03d92575f4578162ec659994b.tar.gz
dded error checking to scripts
Diffstat (limited to 'packaging/SGI/spec.pl')
-rwxr-xr-xpackaging/SGI/spec.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/packaging/SGI/spec.pl b/packaging/SGI/spec.pl
index 93aa8632d98..01453fd9235 100755
--- a/packaging/SGI/spec.pl
+++ b/packaging/SGI/spec.pl
@@ -3,7 +3,7 @@
# This perl script generates the samba.spec file based on the version
# information in the version.h file in the source tree
-open (VER,'../../source/version.h');
+open (VER,'../../source/version.h') || die "Unable to open version.h\n";
($_ = <VER>) =~ s/"//g;
close (VER);
@foo = split(' ');
@@ -25,7 +25,7 @@ elsif (/p/) {
$vernum = sprintf " version %02d%02d%02d%02d%02d\n",$v1,$v2,$v3,$v4,$v5;
# generate the samba.spec file
-open(SPEC,">samba.spec");
+open(SPEC,">samba.spec") || die "Unable to open samba.spec for output\n";
print SPEC "product samba\n";
print SPEC $vername;
print SPEC " image sw\n";
@@ -71,6 +71,6 @@ print SPEC " exp samba.src.samba\n";
print SPEC " endsubsys\n";
print SPEC " endimage\n";
print SPEC "endproduct\n";
-close SPEC;
+close SPEC || die "Error on close of samba.spec\n";
print "\nsamba.spec file has been created\n\n";