1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00

dded error checking to scripts

This commit is contained in:
Herb Lewis -
parent e57275dd19
commit b7e1265f10
4 changed files with 37 additions and 8 deletions

View File

@ -10,7 +10,7 @@ chdir '../../';
chdir $curdir; chdir $curdir;
# We don't want the files listed in .cvsignore in the source tree # We don't want the files listed in .cvsignore in the source tree
open(IGNORES,"../../source/.cvsignore"); open(IGNORES,"../../source/.cvsignore") || die "Unable to open .cvsignore file\n";
while (<IGNORES>) { while (<IGNORES>) {
chop; chop;
$ignores{$_}++; $ignores{$_}++;
@ -18,7 +18,7 @@ while (<IGNORES>) {
close IGNORES; close IGNORES;
# get the names of all the binary files to be installed # get the names of all the binary files to be installed
open(MAKEFILE,"Makefile"); open(MAKEFILE,"Makefile") || die "Unable to open Makefile\n";
@makefile = <MAKEFILE>; @makefile = <MAKEFILE>;
@sprogs = grep(/^SPROGS /,@makefile); @sprogs = grep(/^SPROGS /,@makefile);
@progs1 = grep(/^PROGS1 /,@makefile); @progs1 = grep(/^PROGS1 /,@makefile);
@ -71,7 +71,7 @@ if (@codepage) {
# release # release
@allfiles = grep(!/^.*\.o$/ & !/^packaging\/SGI\/bins/ & !/^packaging\/SGI\/catman/ & !/^packaging\/SGI\/html/ & !/^packaging\/SGI\/codepage/, @allfiles); @allfiles = grep(!/^.*\.o$/ & !/^packaging\/SGI\/bins/ & !/^packaging\/SGI\/catman/ & !/^packaging\/SGI\/html/ & !/^packaging\/SGI\/codepage/, @allfiles);
open(IDB,">samba.idb"); open(IDB,">samba.idb") || die "Unable to open samba.idb for output\n";
print IDB "f 0644 root sys etc/config/samba packaging/SGI/samba.config samba.sw.base config(update)\n"; print IDB "f 0644 root sys etc/config/samba packaging/SGI/samba.config samba.sw.base config(update)\n";
print IDB "f 0755 root sys etc/init.d/samba packaging/SGI/samba.rc samba.sw.base\n"; print IDB "f 0755 root sys etc/init.d/samba packaging/SGI/samba.rc samba.sw.base\n";

View File

@ -12,8 +12,8 @@ else {
$OSver = $ARGV[0]; $OSver = $ARGV[0];
} }
open(MAKEIN,"../../source/Makefile"); open(MAKEIN,"../../source/Makefile") || die "Unable to open source Makefile\n";
open(MAKEOUT,">Makefile"); open(MAKEOUT,">Makefile") || die "Unable to open Makefile for output\n";
while (<MAKEIN>) { while (<MAKEIN>) {
if (/^BASEDIR =/) { if (/^BASEDIR =/) {
print MAKEOUT "BASEDIR = /usr/samba\n"; print MAKEOUT "BASEDIR = /usr/samba\n";

View File

@ -8,21 +8,50 @@
# #
echo Making manual pages echo Making manual pages
./mkman ./mkman
errstat=$?
if [ $errstat -ne 0 ]; then
echo "Error $errstat making manual pages\n";
exit $errstat;
fi
# build the sources # build the sources
# #
echo Making binaries echo Making binaries
./makefile.pl $1 # create the Makefile for the specified OS ver ./makefile.pl $1 # create the Makefile for the specified OS ver
errstat=$?
if [ $errstat -ne 0 ]; then
echo "Error $errstat creating Makefile\n";
exit $errstat;
fi
cd ../../source cd ../../source
# make -f ../packaging/SGI/Makefile clean # make -f ../packaging/SGI/Makefile clean
make -f ../packaging/SGI/Makefile all make -f ../packaging/SGI/Makefile all
errstat=$?
if [ $errstat -ne 0 ]; then
echo "Error $errstat building sources\n";
exit $errstat;
fi
cd ../packaging/SGI cd ../packaging/SGI
# generate the packages # generate the packages
# #
echo Generating Inst Packages echo Generating Inst Packages
./spec.pl # create the samba.spec file ./spec.pl # create the samba.spec file
errstat=$?
if [ $errstat -ne 0 ]; then
echo "Error $errstat creating samba.spec\n";
exit $errstat;
fi
./idb.pl # create the samba.idb file ./idb.pl # create the samba.idb file
errstat=$?
if [ $errstat -ne 0 ]; then
echo "Error $errstat creating samba.idb\n";
exit $errstat;
fi
if [ ! -d bins ]; then if [ ! -d bins ]; then
mkdir bins mkdir bins
fi fi

View File

@ -3,7 +3,7 @@
# This perl script generates the samba.spec file based on the version # This perl script generates the samba.spec file based on the version
# information in the version.h file in the source tree # 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; ($_ = <VER>) =~ s/"//g;
close (VER); close (VER);
@foo = split(' '); @foo = split(' ');
@ -25,7 +25,7 @@ elsif (/p/) {
$vernum = sprintf " version %02d%02d%02d%02d%02d\n",$v1,$v2,$v3,$v4,$v5; $vernum = sprintf " version %02d%02d%02d%02d%02d\n",$v1,$v2,$v3,$v4,$v5;
# generate the samba.spec file # 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 "product samba\n";
print SPEC $vername; print SPEC $vername;
print SPEC " image sw\n"; print SPEC " image sw\n";
@ -71,6 +71,6 @@ print SPEC " exp samba.src.samba\n";
print SPEC " endsubsys\n"; print SPEC " endsubsys\n";
print SPEC " endimage\n"; print SPEC " endimage\n";
print SPEC "endproduct\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"; print "\nsamba.spec file has been created\n\n";