Many of these Perl scripts use the InstallOps
module (found in InstallOps.pm with the other
scripts). This module provides subroutines implementing commonly used
techniques in working with directory trees and files during
installation. Ideally, it is general enough to be used in writing new
scripts that can be added to the installation process. A short
description of the available subroutines and their use is provided
here.
($start_dir,
$base_inst_dir); |
Recurse through the given directory tree beginning at $start_dir. The second argument, $base_inst_dir, names the base directory to which the files will be installed. This routine requires that the calling package define a subroutine called recurseAction() that defines what actions to take when a normal file is encountered during the recursion process. It is only called when non-directory type files are found in the current directory of the recursion process. Since this is specialized for installation, it ensures that the destination directories (rooted at $base_inst_dir) exist.
Create a new directory ($newdir) in a given directory tree ($base_dir). If it already exists, it is not created.
($filename, $uid, $gid, $mode,
$dest_dir); |
Install a given file ($filename) with specified permissions ($mode) in UNIX octal style to a destination directory ($dest_dir). Ownership is set based on the provided values for $uid and $gid (which has no effect on a Win32 platform).
(Replace tags of the form
@...@ in the given file
($infile) with known replacement values (found
in %VARS). The tags are the keys of
%VARS, and the replacement values are the
values associated with those keys.); |