#!/bin/bash
# Install pre-requisites that we depend on for maintenance and operation
# of the package
set -e
#
MYPROGNAME=`basename $0`
MYBUNDLE="ssh_certificate"
if [ $# -ne 1 ] || [ ! "$1" == "install" ]
then
    cat <<EOF

${MYBUNDLE} prerequisites installation script.

Use: ${MYPROGNAME} install
       To install the pre-requisite packages.
     ${MYPROGNAME}
       To display this information

     Install the pre-requisites that we depend on for maintenance and
     operation of the package

     This script relies on these scripts:
         /etc/ubprerequisites/minimal

     Install the ubprerequisites package first.

EOF
    exit 1
fi
if [ -x /usr/lib/ubprerequisites/minimal ] 
then
    /usr/lib/ubprerequisites/minimal install
    cat <<EOF

${MYBUNDLE} prerequisite packages are installed

EOF
else
    cat <<EOF
This script relies on these executables:
    /usr/lib/ubprerequisites/minimal
Since they are missing you must install the ubprerequisites package first.

EOF
    exit 1
fi
exit 0
