2 eval 'exec perl -wS $0 ${1+"$@"}'
5 #*************************************************************************
6 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8 # Copyright 2008 by Sun Microsystems, Inc.
10 # OpenOffice.org - a multi-platform office productivity suite
12 # $RCSfile: installoffice.pl,v $
14 # $Revision: 1.2.24.1 $
16 # This file is part of OpenOffice.org.
18 # OpenOffice.org is free software: you can redistribute it and/or modify
19 # it under the terms of the GNU Lesser General Public License version 3
20 # only, as published by the Free Software Foundation.
22 # OpenOffice.org is distributed in the hope that it will be useful,
23 # but WITHOUT ANY WARRANTY; without even the implied warranty of
24 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 # GNU Lesser General Public License version 3 for more details
26 # (a copy is included in the LICENSE file that accompanied this code).
28 # You should have received a copy of the GNU Lesser General Public License
29 # version 3 along with OpenOffice.org. If not, see
30 # <http://www.openoffice.org/license.html>
31 # for a copy of the LGPLv3 License.
32 #***********************************************************************/
39 ( our $script_name = $script ) =~ s/^.*\b(\w+)\.pl$/$1/;
40 ( our $script_path = $script ) =~ s/$script_name.*//;
45 our $debug = 0; # run without executing commands
47 our $is_command_infos = 1; # print command details before exec
48 our $show_NoMessage = 0;
49 our $show_Message = 1;
51 # special handling for cwschackapi
54 # remove existant office installation
57 # should the office be startable without user interaction
60 # should impress open documents without autopilot
63 # force openOffice.org installation if StarOffice is available
68 our $is_admin_installation = 1;
71 our $temp_path = $ENV{TEMP
};
72 if (!defined($temp_path)) {
73 $temp_path = $ENV{TMP
};
76 our $vcsid = $ENV{VCSID
};
77 our $sversion_saved = 0;
78 our $FileURLPrefix = "file:///";
79 our $userinstalldir = "UserInstallation";
80 our $cygwin = "cygwin";
81 our $prefered_lang = "en-US";
82 our $global_instset_mask = "";
83 #$smoketest_install = $ENV{SMOKETESTINSTALLSET};
86 print "The workstamp is missing. Please use setsolar\n";
90 our $OfficeDestinationPath;
95 our $NewPathSeparator ;
114 our $bootstrapiniTemp ;
123 $user = $ENV{USERNAME
};
125 $NewPathSeparator = ';';
126 $shell = "$ENV{COMSPEC} -c ";
127 $shellSetEnvVar = "set ";
128 $shellCommandSep = "& ";
130 $PERL = "$shell $ENV{PERL}";
131 $REMOVE_DIR = "$shell del /qsxyz";
132 $REMOVE_FILE = "$shell del /q";
133 $LIST_DIR = "$shell ls";
134 $COPY_FILE = "$shell copy";
135 $COPY_DIR = "$shell copy /s";
137 $RENAME_FILE = "ren";
139 $RESPFILE="response_fat_wnt";
140 $SVERSION_INI = $ENV{USERPROFILE
} . $PS . "Anwendungsdaten" . $PS . "sversion.ini";
141 $SOFFICEBIN = "soffice.exe";
142 $bootstrapini = "bootstrap.ini";
143 $UNOPKGBIN="unopkg.exe";
144 $bootstrapiniTemp = $bootstrapini . "_";
145 $packpackage = "msi";
146 if (!defined($temp_path)) {
147 print "temp value is missing. Please set temp-variable\n";
151 elsif ($gui eq "UNX") {
153 $is_do_deinstall = 0;
155 $shell = "/bin/sh -c ";
156 $shellSetEnvVar = "export ";
157 $shellCommandSep = ";";
159 $NewPathSeparator = ':';
161 $PERL = "$ENV{PERL}";
162 $REMOVE_DIR = "rm -rf";
163 $REMOVE_FILE = "rm -f";
165 $COPY_FILE = "cp -f";
166 $COPY_DIR = "cp -rf";
169 $nul = '> /dev/null';
170 $RESPFILE="response_fat_unx";
171 $SVERSION_INI = $ENV{HOME
} . $PS . ".sversionrc";
172 $SOFFICEBIN = "soffice";
173 $bootstrapini = "bootstraprc";
175 $bootstrapiniTemp = $bootstrapini . "_";
176 $packpackage = $ENV{PKGFORMAT
};
177 if (!defined($temp_path)) {
179 if (! -e
$temp_path){
180 print "temp value is missing. Please set temp-variable\n";
185 elsif ($gui eq $cygwin) {
188 $NewPathSeparator = ':';
189 $shell = "/bin/sh -c ";
190 $shellSetEnvVar = "export ";
191 $shellCommandSep = ";";
193 $PERL = "$ENV{PERL}";
194 $REMOVE_DIR = "rm -rf";
195 $REMOVE_FILE = "rm -f";
197 $COPY_FILE = "cp -f";
198 $COPY_DIR = "cp -rf";
201 $nul = '> /dev/null';
202 $RESPFILE="response_fat_wnt";
203 $SVERSION_INI = $ENV{USERPROFILE
} . $PS . "Anwendungsdaten" . $PS . "sversion.ini";
204 $SOFFICEBIN = "soffice";
205 $bootstrapini = "bootstrap.ini";
206 $bootstrapiniTemp = $bootstrapini . "_";
207 $CygwinLineends = $/;
208 $WinLineends = "\r\n";
210 $packpackage = "msi";
211 if (!defined($temp_path)) {
213 if (! -e
$temp_path){
214 print "temp value is missing. Please set temp-variable\n";
220 print_error
("not supported system\n",1);
223 my %PRODUCT1 = (Name
=> "StarOffice", instset
=> "instset_native");
224 my %PRODUCT2 = (Name
=> "OpenOffice", instset
=> "instsetoo_native");
225 our @PRODUCT = (\
%PRODUCT1, \
%PRODUCT2);
227 our $SHIP = defined $ENV{SHIPDRIVE
} ?
$ENV{SHIPDRIVE
} . $PS : "shipdrive_not_set";
229 if (defined($ENV{CWS_WORK_STAMP
})){
230 print " found CWS\n";
232 elsif (isLocalEnv
()){
233 print " local environment\n";
235 elsif (defined $ENV{SHIPDRIVE
}) {
236 print " master version\n";
238 elsif (defined $ENV{SOLARSRC
}) {
239 print " OpenOffice master version\n";
242 print "Could not determine environment. Exit\n";
247 our @error_messages = ( '',
248 'lock flag for pkgadd still exist. Installation not possible!',
249 'Error during installation!',
250 'Error: patching configuration failed!',
251 'Error: starting office failed or office crashed!',
252 'Error during testing',
253 'can not copy extension',
254 'Error in setup log',
255 'installationsset is not complete',
256 'can not copy all basic scripts',
257 'can not patch bottstrapini',
258 'msiexec failed. Maybe you have got an installed version',
259 'deinstallation is incomplete'
264 $success = installOffice
();
274 # my ($officeVersion, $instsetPath)= getInstset();
275 # print "OFFICEVERSION:$officeVersion INSTSETPATH:$instsetPath\n" if $debug;
276 # my $sourcePath=$instsetPath.$PS.$officeVersion;
279 # currently this installer does not install an office, it do pack a runnable office.
280 # Therefore we do not need to search for an instSet
281 my $sourcePath="dummy";
282 my $officeVersion="dummy";
284 my $destinationPath = getDestinationPath
($officeVersion);
285 print "destinationPath: $destinationPath\n" if $debug;
287 removeOffice
($destinationPath);
288 mkdirs
($destinationPath);
290 my $installCommand = getInstallCommand
($sourcePath, $destinationPath, $officeVersion);
291 print "installCommand: $installCommand\n" if $debug;
294 $success = system($installCommand);
295 print "installoofice.pl::installoffice::success $success\n" if ($debug);
298 makeAutoRun
($destinationPath);
302 makeAutoImpress
($destinationPath);
308 sub makeAutoImpress
(){
309 my $destinationPath = shift;
311 if (patchXCU
($destinationPath, $script_path.$script_name."_impress.oxt") != 0) {
312 print_error
("could not register ".$script_path.$script_name."_impress.oxt", "1");
320 my $destinationPath = shift;
322 patchBootstraprc
($destinationPath);
324 if (patchXCU
($destinationPath, $script_path.$script_name.".oxt") != 0) {
325 print_error
("could not register ".$script_path.$script_name.".oxt", "1");
331 sub patchBootstraprc
(){
332 my $destinationPath = shift;
335 find
sub { $bootstraprc=$File::Find
::name
if -e _
&& /$bootstrapini$/ }, $destinationPath;
337 print_error
("could not find $bootstrapini", "1") if ( ! -e
$bootstraprc );
339 open(BSRC
, "<$bootstraprc") or errorFromOpen
(" for reading " .$bootstraprc);
340 my @content = <BSRC
>;
344 if ( /UserInstallation=./ ) {
345 push(@newContent, "UserInstallation=\$ORIGIN/../UserInstallation\n");
348 push(@newContent,$_);
352 chmod(0755,$bootstraprc);
354 open OUTFILE
, ">$bootstraprc" or return errorFromOpen
(" for writing " . $bootstraprc);
355 print OUTFILE
@newContent;
361 my $destinationPath = shift;
365 find
sub { $unopkg=$File::Find
::name
if -e _
&& /$UNOPKGBIN$/ }, $destinationPath;
367 print_error
("could not find $UNOPKGBIN", "1") if ( !-e
$unopkg );
368 print "unopkg: '$unopkg'\n" if $debug;
371 $unopkg = "\"$unopkg\"";
374 my $unopkgCommand = "$unopkg add $oxt";
375 print "register oxt file ...\n" if $debug;
376 print "call $unopkgCommand\n" if $debug;
378 $success = system($unopkgCommand);
384 my $fileName = shift;
387 open OUTFILE
, ">$fileName" or return errorFromOpen
(" for writing " . $fileName);
390 if ($packpackage eq "msi"){
397 foreach $line(@content) {
398 print "LINE: $line\n" if $debug;
399 print OUTFILE
$line.$lf;
406 my $directory = shift;
411 my @aFolder=split($splitter,$directory);
415 foreach $folder(@aFolder){
416 if ( (! defined($dir)) && ($PS eq "\\")){
419 $dir=$dir.$PS.$folder;
422 print "try to create $dir\n" if $debug;
433 print "remove old office installation...\n";
435 print "remove $destPath...\n" if $debug;
441 sub getInstallCommand
() {
443 $command = getDmakeInstalledCommand
(@_);
444 # if ($packpackage eq "msi"){
445 # $command = getWindowsInallCommand(@_);
447 # $command = getUnixInstallCommand(@_);
452 sub getDmakeInstalledCommand
(){
453 my ($sourcePath, $destPath, $officeVersion) = @_;
454 my $RootDir=$ENV{SRC_ROOT
};
459 # check if instset_native could be found
460 foreach my $pointer (@PRODUCT) {
461 $instset = $pointer->{'instset'};
462 $ProductName = $pointer->{'Name'};
463 my $instsetDir = "$RootDir$PS$instset";
464 print "instsetDir: $instsetDir \n" if $debug;
466 last if ($is_ooo && $ProductName eq "OpenOffice");
467 last if ( ! $is_ooo && -e
"$instsetDir");
469 print "Product: $ProductName\n" if $debug;;
471 my $dmakeTarget=lc($ProductName)."_en-US";
473 my $utilFolder = getInstsetUtilFolder
($instset, $destPath, $RootDir);
474 my $dmakeCommand = " $cdCommand \"$utilFolder\" $shellCommandSep dmake $dmakeTarget PKGFORMAT=installed -vt";
477 $envset="set LOCALINSTALLDIR=$destPath & set LOCALUNPACKDIR=$destPath &";
479 $envset="LOCALINSTALLDIR=$destPath ; LOCALUNPACKDIR=$destPath ; export LOCALINSTALLDIR ; export LOCALUNPACKDIR ; ";
481 #my $command=$envset.$dmakeCommand;
482 my $command=$dmakeCommand;
486 sub getInstsetUtilFolder
(){
488 my $destPath = shift;
491 my $instsetFolder = $RootDir.$PS.$instset;
494 if( open(DATEI
, ">$instsetFolder".$PS."touch"))
497 unlink($instsetFolder.$PS."touch");
498 print "$instsetFolder is writable \n" if $debug;
499 $utilFolder = $RootDir.$PS.$instset.$PS."util";
503 print "$instsetFolder is NOT writable \n" if $debug;
504 print "copy $instset to $destPath$PS..\n" if $debug;
505 my $prjPath=$destPath.$PS."..";
507 my $command = "$ENV{COPYPRJ} -x $instset $prjPath";
508 print $command if $debug;
510 $utilFolder=$prjPath.$PS.$ENV{WORK_STAMP
}.$PS.$instset.$PS."util";
512 print "utilFolder: $utilFolder\n" if $debug;
516 # sub getInstsetFomInstsetNative(){
517 # my (@DirArray, $TestDir1, $TestDir2);
522 # my $RootDir=$ENV{SRC_ROOT};
523 # my $StandDir = $ENV{SOLARSRC} . $PS;
524 # #$RootDir=~s/\w+$//;
526 # foreach my $pointer (@PRODUCT) {
527 # $instset = $pointer->{'instset'};
528 # $ProductName = $pointer->{'Name'};
530 # $TestDir1 = "$RootDir$PS$instset$PS$ENV{INPATH}$PS$ProductName$PS$packpackage$PS" . "install$PS";
531 # $TestDir2 = "$StandDir$instset$PS$ENV{INPATH}$PS$ProductName$PS$packpackage$PS" . "install$PS";
532 # print "TestDir1: $TestDir1 \n";
533 # print "TestDir2: $TestDir2 \n";
534 # if (-e "$TestDir1") {
535 # $instDir= $TestDir1;
537 # elsif (-e "$TestDir2") {
538 # $instDir="$TestDir2";
540 # if ($instDir eq "") {
544 # getSubDirs ("$instDir", \@DirArray);
545 # $lang = findSubDir (\@DirArray);
546 # print "Lang-Sel: $lang\n" if $is_command_infos;
548 # if (($instDir ne "") and (-e $instDir)) {
549 # return ($lang, $instDir, $ProductName, $instset);
552 # print_error ("no installationset found\n",2);
556 sub getWindowsInallCommand
(){
557 my ($sourcePath, $destPath) = @_;
558 my $mask = "\\.msi\$";
561 getSubFiles
("$sourcePath", \
@DirArray, $mask);
562 if ($#DirArray == -1) {
563 print_error
("Installationset in $sourcePath is incomplete", 2);
565 if ($#DirArray >= 1) {
566 print_error
("Installationset in $sourcePath hat too many msi-files", 2);
567 print "found the following msi-files: @DirArray\n" if $debug;
569 my $command = "msiexec.exe /a $sourcePath$PS$DirArray[0] -qn ALLUSERS=2 INSTALLLOCATION=$destPath";
574 sub getUnixInstallCommand
() {
575 my ($sourcePath, $destPath, $officeVersion) = @_;
577 my $userland="unknown";
579 if (defined($ENV{CWS_WORK_STAMP
})){
580 print " found CWS\n";
581 $userland=$ENV{SOLARVERSION
}.$PS.$ENV{INPATH
}.$PS."bin".$ENV{UPDMINOREXT
}.$PS."userscripts".$PS."install";
583 elsif (isLocalEnv
()){
584 print " local environment\n";
586 elsif (defined $ENV{SHIPDRIVE
}) {
587 print " master version\n";
588 $userland=$ENV{SHIPDRIVE
}.$PS.$ENV{INPATH
}.$PS."UserScripts".$PS.$ENV{PKGFORMAT
}.$PS.$officeVersion.$PS."install";
590 elsif (defined $ENV{SOLARSRC
}) {
591 print " OpenOffice master version\n";
592 print " command to install Office not implementet yet\n";
596 print "Could not determine environment. Exit\n";
599 return "$userland $sourcePath $destPath";
604 sub getDestinationPath
{
605 # if (defined $ENV{SOLARROOT}){
606 # # seems to be a Sun environment
607 # if (! -e $OfficeDestinationPath){
611 my $officeVersion = shift;
614 if (defined($ENV{LOCALINSTALLDIR
})){
615 $OfficeDestinationPath=$ENV{LOCALINSTALLDIR
};
616 if(index($OfficeDestinationPath," ") >= 0) {
617 my $msg="You environemt variable '\$LOCALINSTALLDIR=$OfficeDestinationPath' contains white spaces.";
618 $msg = $msg." This is not allowed!";
619 print_error
($msg, "1");
622 if (!defined($OfficeDestinationPath)){
623 $officename = $officeVersion;
624 if (defined($ENV{CWS_WORK_STAMP
})){
625 $officename=$ENV{CWS_WORK_STAMP
};
627 $OfficeDestinationPath=$temp_path.$PS.$user.$PS."office".$PS.$officename;
630 return $OfficeDestinationPath;
635 # my ($INSTSET, $NEWINSTSET, $ProductName);
637 # if (defined ($ENV{EPM}) && ($ENV{EPM} eq 'NO') && ($gui eq "UNX")) { # we do the install ourselves ...
641 # print "get Instset\n" if $debug;
644 # if (!isLocalEnv() and !defined($ENV{CWS_WORK_STAMP}) and (-e $SHIP) and ($gui ne $cygwin)) {
645 # ($NEWINSTSET, $INSTSET) = getSetFromServer();
648 # ($NEWINSTSET, $INSTSET, $ProductName) = getInstsetFomInstsetNative();
650 # return ($NEWINSTSET, $INSTSET);
653 # sub getSetFromServer {
654 # my ($DirName, $SetupFullPath);
655 # my $workspace = $ENV{WORK_STAMP};
656 # my $platform = $ENV{INPATH};
658 # my (@DirArray, $mask, $buildid, $milestone);
660 # foreach my $pointer (@PRODUCT) {
661 # my $ProductName = $pointer->{'Name'};
663 # print "##PRODUCT: $ProductName\n";
664 # my $SetupFullPath = "$SHIP$ENV{INPATH}$PS$ProductName$PS$packpackage$PS";
665 # if ( ! ( $workspace && $platform ) ) {
666 # print_error ( "Error: environment not set correctly.", 1);
668 # # get latest broadcastet milestone and pack number
669 # ($milestone, $buildid) = get_milestoneAndBuildID( $workspace, $platform );
671 # if (defined $ENV{CWS_WORK_STAMP}) {
672 # # /unxlngi6.pro/StarOffice/rpm/ SRC680_m245_native_packed-2_en-US.9267/
673 # $mask = "^$workspace" . "_" . $milestone . "_native_packed-(\\d+)_en-US\\.$buildid";
675 # # cws03/os110/OOH680/src.m4/instset_native/unxlngi6.pro/StarOffice/rpm install/en-US/RPMS
676 # $mask = "^$workspace" . "_" . $milestone . "_native_packed-(\\d+)_en-US\\.$buildid";
678 # print "MASK: $mask\n";
679 # $global_instset_mask = $mask;
680 # getSubFiles ($SetupFullPath, \@DirArray, $mask);
681 # @DirArray = sort InstsetSort @DirArray;
683 # if ($#DirArray > -1) {
684 # $latestset = $DirArray [$#DirArray];
685 # $DirName = $latestset;
688 # print_error ("Cannot find install set $SetupFullPath for $workspace $milestone", 2);
691 # print "Latest install sets: $latestset\n" if $debug;
693 # print "$DirName\t $SetupFullPath\n" if $debug;
694 # # compare with file system
695 # # at the moment just the existence is checked. For security reasons it might be
696 # # better to additionally check whether there are newer sets (this must not happen,
697 # # but who knows ...)
698 # if ( -d $SetupFullPath ) {
699 # # if found => return and don't continue searching
700 # # this is usefull to set a priority to find installsets in @PRODUCT
701 # # first comes, first wins
702 # return ($DirName, $SetupFullPath);
706 # # compare with file system
707 # # at the moment just the existence is checked. For security reasons it might be
708 # # better to additionally check whether there are newer sets (this must not happen,
709 # # but who knows ...)
710 # if ( -d $SetupFullPath ) {
711 # return ($DirName, $SetupFullPath);
713 # print_error ("Cannot find install set $SetupFullPath for $workspace $milestone", 2);
717 # sub get_milestoneAndBuildID {
718 # my ( $ws, $pf ) = @_;
719 # my ($milestone, $buildid, $upd, $path, $updext, $line);
721 # if ( $ws =~ /^\D+(\d+)$/) {
725 # if (defined ($ENV{UPDMINOREXT})) {
726 # $updext = $ENV{UPDMINOREXT};
732 # $path = "$ENV{SOLARVER}$PS$pf$PS" . "inc$updext$PS$upd" . "minor.mk";
733 # print "$path\n" if $debug;
736 # if ( !open(MINORMK,$path) ) {
737 # print "FATAL: can't open $path\n";
741 # if (!eof(MINORMK)) {
742 # while ($line = <MINORMK>) {
744 # if ( $line =~ /LAST_MINOR=(\w+)/ ) {
747 # elsif ( $line =~ /BUILD=(\d+)/ ) {
754 # if (!defined($milestone)) {
755 # print_error ("Milestone ist not defined!", 2);
757 # if (!defined($buildid)) {
758 # print_error ("Build-ID ist not defined!", 2);
761 # return ($milestone, $buildid);
767 my $error_code = shift;
769 print STDERR
"ERROR: $message\n";
774 my ($startDir, $DirArray_ref, $mask) = @_;
777 opendir(DIR
,"$startDir");
778 while($dir = readdir(DIR
)) {
779 if (($dir =~ /\.$/) or ($dir !~ /$mask/)) {
782 push (@
{$DirArray_ref}, "$dir");
790 if ($a =~ /$global_instset_mask/) {
793 if ($b =~ /$global_instset_mask/) {
801 if (defined ($ENV{SOL_TMP
}) && defined ($ENV{SOLARVERSION
})) {
802 my $mask = $ENV{SOL_TMP
};
804 print "Mask: $mask\n" if $debug;
805 if ($ENV{SOLARVERSION
}=~ /$mask/) {
813 my ($startDir, $DirArray_ref) = @_;
815 opendir(DIR
,"$startDir");
816 while($dir = readdir(DIR
)) {
817 if (($dir !~ /\.$/) and ( -d
"$startDir$dir") ) {
818 push (@
{$DirArray_ref}, "$dir");
826 my ($DirArray_ref) = @_;
827 my (@sortedArray, $dir, $instdir);
828 @sortedArray = sort langsort @
{$DirArray_ref};
829 print "Langs: @sortedArray\n" if $is_command_infos;
830 foreach $dir (@sortedArray) {
831 if ($dir =~ /log$/) {
841 if ($a eq $prefered_lang) {
844 elsif ($b eq $prefered_lang) {
854 my $error_code = shift;
855 # if ($sversion_saved) {
856 # restore_sversion ($SVERSION_INI);
858 # if ($is_remove_on_error) {
859 # if ($is_do_deinstall) {
860 # deinstallInstallation ($installpath);
862 # removeInstallation($installpath);
865 # print_notRemoved ($installpath);
868 print STDERR
"\nFAILURE: $script_name aborted.\n";
877 for (my $i=0; $i<=$#ARGV; $i++) {
878 if ( $ARGV[$i] =~ /^-cwscheckapi$/ ) {
879 my $value = $ARGV[++$i];
880 if ($value =~ /^true$/ || ($value =~ /^1$/) ) {
888 if ( $ARGV[$i] =~ /^-dest$/ ) {
889 $OfficeDestinationPath = $ARGV[++$i];
892 if ( $ARGV[$i] =~ /^-cleanup$/ ) {
893 my $value = $ARGV[++$i];
894 if ($value =~ /^true$/ || ($value =~ /^1$/ )) { $cleanup = 1 };
897 if ( $ARGV[$i] =~ /^-autorun$/ ) {
898 my $value = $ARGV[++$i];
899 if ($value =~ /^true$/ || ($value =~ /^1$/ )) { $autorun = 1 };
902 if ( $ARGV[$i] =~ /^-autoimpress$/ ) {
903 my $value = $ARGV[++$i];
904 if ($value =~ /^true$/ || ($value =~ /^1$/ )) { $autoimpress = 1 };
907 if ( $ARGV[$i] =~ /^-debug$/ ) {
908 my $value = $ARGV[++$i];
909 if ($value =~ /^true$/ || ($value =~ /^1$/ )) { $debug = 1 };
912 if ( $ARGV[$i] =~ /^-ooo$/ ) {
913 my $value = $ARGV[++$i];
914 if ($value =~ /^true$/ || ($value =~ /^1$/ )) { $is_ooo = 1 };
920 sub getSubDirsFullPath
{
921 my ($startDir, $DirArray_ref) = @_;
923 opendir(DIR
,"$startDir");
924 while($dir = readdir(DIR
)) {
925 if (($dir !~ /\.$/) and ( -d
"$startDir$dir") ) {
926 push (@
{$DirArray_ref}, "$startDir$dir");
934 print_error
( "can not open $file", "1");