#!/usr/bin/perl
+require "pwd.pl" || die "Required pwd.pl not found";
# This perl script automatically generates the samba.idb file
+&initpwd;
$curdir = $ENV{"PWD"};
# get a complete list of all files in the tree
if (@sprogs) {
@sprogs[0] =~ s/^.*\=//;
- @sprogs[0] =~ s/^.*\)//;
@sprogs = split(' ',@sprogs[0]);
}
if (@progs) {
@progs[0] =~ s/^.*\=//;
- @progs[0] =~ s/^.*\)//;
@progs = split(' ',@progs[0]);
}
if (@progs1) {
@progs1[0] =~ s/^.*\=//;
- @progs1[0] =~ s/^.*\)//;
@progs1 = split(' ',@progs1[0]);
}
if (@scripts) {
@scripts[0] =~ s/^.*\=//;
- @scripts[0] =~ s/^.*\)//;
@scripts = split(' ',@scripts[0]);
}
if (@codepage) {
@codepage[0] =~ s/^.*\=//;
- @codepage[0] =~ s/^.*\)//;
chdir '../../source';
# if we have codepages we need to create them for the package
- system("./installcp.sh . ../packaging/SGI/codepage . @codepage[0]");
+ system("./installcp.sh . ../packaging/SGI/codepages . @codepage[0]");
chdir $curdir;
@codepage = sort split(' ',@codepage[0]);
}
# add my local files to the list of binaries to install
-@bins = sort (@sprogs,@progs,@progs1,@scripts,("psfixes.pl","sambalp","smbprint"));
+@bins = sort (@sprogs,@progs,@progs1,@scripts,("findsmb","sambalp","smbprint"));
# the files installed in docs include all the original files in docs plus all
# the "*.doc" files from the source tree
# strip out all the generated directories and the "*.o" files from the source
# 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\/codepages/, @allfiles);
open(IDB,">samba.idb") || die "Unable to open samba.idb for output\n";
print IDB "d 0755 root sys usr/samba/bin packaging/SGI samba.sw.base\n";
while(@bins) {
$nextfile = shift @bins;
- if ($nextfile eq "smbpasswd") {
- print IDB "f 4555 root sys usr/samba/bin/$nextfile source/$nextfile samba.sw.base\n";
- }
- elsif ($nextfile eq "psfixes.pl") {
- print IDB "f 0755 root sys usr/samba/bin/$nextfile packaging/SGI/$nextfile samba.sw.base\n";
- }
- elsif ($nextfile eq "sambalp") {
- print IDB "f 0755 root sys usr/samba/bin/$nextfile packaging/SGI/$nextfile samba.sw.base\n";
- }
- elsif ($nextfile eq "smbprint") {
- print IDB "f 0755 root sys usr/samba/bin/$nextfile packaging/SGI/$nextfile samba.sw.base\n";
- }
- else {
- print IDB "f 0755 root sys usr/samba/bin/$nextfile source/$nextfile samba.sw.base\n";
+
+ if (index($nextfile,'$')) {
+ if ($nextfile eq "smbpasswd") {
+ print IDB "f 4555 root sys usr/samba/bin/$nextfile source/$nextfile samba.sw.base\n";
+ }
+ elsif ($nextfile eq "findsmb") {
+ print IDB "f 0755 root sys usr/samba/bin/$nextfile packaging/SGI/$nextfile samba.sw.base\n";
+ }
+ elsif ($nextfile eq "sambalp") {
+ print IDB "f 0755 root sys usr/samba/bin/$nextfile packaging/SGI/$nextfile samba.sw.base\n";
+ }
+ elsif ($nextfile eq "smbprint") {
+ print IDB "f 0755 root sys usr/samba/bin/$nextfile packaging/SGI/$nextfile samba.sw.base\n";
+ }
+ else {
+ print IDB "f 0755 root sys usr/samba/bin/$nextfile source/$nextfile samba.sw.base\n";
+ }
}
}
print IDB "f 0755 root sys usr/samba/inetd.sh packaging/SGI/inetd.sh samba.sw.base\n";
print IDB "d 0755 root sys usr/samba/lib packaging/SGI samba.sw.base\n";
if (@codepage) {
- print IDB "d 0755 root sys usr/samba/lib/codepage packaging/SGI samba.sw.base\n";
+ print IDB "d 0755 root sys usr/samba/lib/codepages packaging/SGI samba.sw.base\n";
while (@codepage) {
$nextpage = shift @codepage;
- print IDB "f 0644 root sys usr/samba/lib/codepage/codepage.$nextpage packaging/SGI/codepage/codepage.$nextpage samba.sw.base\n";
+ print IDB "f 0644 root sys usr/samba/lib/codepages/codepage.$nextpage packaging/SGI/codepages/codepage.$nextpage samba.sw.base\n";
}
}
print IDB "f 0644 root sys usr/samba/lib/smb.conf packaging/SGI/smb.conf samba.sw.base config(update)\n";
print IDB "d 0755 root sys usr/samba/src/$nextfile $nextfile samba.src.samba\n";
}
else {
- if (grep(/SGI/ & (/\.sh$/ | /\.pl$/ | /mkman$/),$nextfile)) {
+ if (grep((/\.sh$/ | /\.pl$/ | /mkman$/),$nextfile)) {
print IDB "f 0755 root sys usr/samba/src/$nextfile $nextfile samba.src.samba\n";
}
else {