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
commit365f1eadaa969e807dd8906a3291100b4a37def6 (patch)
tree4f9ad67c913eed8811ecece693b03f25b51e28b8 /packaging/SGI/spec.pl
parentbea2394b49bfa5db08c45b2ff76e5bb643cec629 (diff)
downloadsamba-365f1eadaa969e807dd8906a3291100b4a37def6.tar.gz
samba-365f1eadaa969e807dd8906a3291100b4a37def6.tar.bz2
samba-365f1eadaa969e807dd8906a3291100b4a37def6.zip
dded error checking to scripts
(This used to be commit b7e1265f106010e03d92575f4578162ec659994b)
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 93aa8632d9..01453fd923 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";