install-repo.ksh README					v.1.6  7/17

This command will unzip and install zipped IPS repository image components
into the designated directory.

The script will perform the following functions:

    Validate digests of downloaded files (optional)
    Uncompress each part into a specified directory
    Verify the repository image (optional - if supported by the system's OS)
    Create an ISO file for mounting and distribution (optional)

In addition, if the selected destination already contains a repository, you
will be given the option to add the new repository contents to the existing
repository (and rebuild the catalog and index files).  When you add to an 
existing repository, existing repository properties (found in the file 
pkg5.repository at the repository's top level) are preserved.

Note that if the option to create an ISO image is used, the README for using
the ISO image is contained at the top level of the destination as supplied 
by the -d option.

USAGE:
install-repo.ksh -d dest [-s zipsrc] [-i image-name] [-c] [-v] [-I] [-y]

-d dest   = The destination directory where the repository will be created.
-s zipsrc = The full path to the directory where the zip files are located. 
            Default: the current directory.
-i image  = The name of the image. For example, sol-11_3-repo. Default: the
            name found in zipsrc directory.
-c        = Compare digests of downloaded zip files.
-v        = Verify the repository after unzipping.
-I        = Create an ISO image.
-y        = Add to an existing repository without prompting for confirmation. 
            Use with caution.

The new repository is created directly under the dest directory. The dest
directory will also contain the ISO README file if an ISO image was created.

The ISO image is created in the source directory: either the current
directory or the zipsrc directory.  The directory must be writable in 
order to create the ISO image.

Options:
Use the -s (source) option to specify a location for the downloaded zip files
that is different than the location of the install-repo.ksh script. Otherwise,
it is assumed that the script and the zip files are all within the current
working directory.

The -i option can be used to specify one of multiple releases that might
reside in the same download directory. For example, if the download files from
Solaris 11.3 Beta and the Solaris 11.3 final release reside in the same
directory, then "-i sol-11_3-beta-repo" will select the Solaris 11.3 beta files.
If zip files for multiple releases exist in the source directory and -i is
not specified, the newest download is selected.

When using the "-i" option, the image name will vary based on the download
source:
OTN : sol-11_3-repo
OSDC: V12345-01
MOS : p19298012_1100_SOLARIS64

If an existing repository is selected as the destination, then the user is
prompted to add to that repository.  If the answer is "y" or "yes", then the 
contents of the downloaded zip files are added to the existing repository, 
and the catalog and search indices are rebuilt to include the new packages.

Note: Before adding to an existing repository, snapshot the ZFS file system 
that contains the existing repository.

If the -y option is used, information is displayed regarding the existing
repository, and then the installation will proceed without prompting for 
confirmation.

The following example uses the digest (-c) and repository verification (-v)
flags, and uses the -I option to create an ISO image. The selected destination 
already contains a repository.

$ install-repo.ksh -d /tank/repos/dev -I -v -c

Comparing digests of downloaded files...done. Digests match.
IPS repository exists at destination /tank/repos/dev
Current version: 0.175.3.0.0.25
Do you want to add to this repository? (y/n) y
Uncompressing sol-11_3-repo_1of5.zip...done.
Uncompressing sol-11_3-repo_2of5.zip...done.
Uncompressing sol-11_3-repo_3of5.zip...done.
Uncompressing sol-11_3-repo_4of5.zip...done.
Uncompressing sol-11_3-repo_5of5.zip...done.
Repository can be found in /tank/repos/dev.
Initiating repository rebuild.
Initiating repository verification.
Building ISO image...done.
ISO image can be found at:
/tank/downloads/sol-11_3-repo.iso
Instructions for using the ISO image can be found at:
/tank/repos/dev/README-repo-iso.txt
