File:  [Coherent Logic Development] / freem_fileman / install.sh
Revision 1.2: download - view: text, annotated - select for diffs
Mon Apr 28 21:18:49 2025 UTC (5 weeks ago) by snw
Branches: MAIN
CVS tags: HEAD
Update install script

#!/usr/bin/env bash

PGM=$(basename $0 .sh)
INSTALL_BASE=/usr/local/var/freem


function usage()
{
    echo "usage:  $0 <environment> <namespace>"
}

if [[ ! -d ${INSTALL_BASE} ]]
then
    echo "${PGM}:  ${INSTALL_BASE} does not exist"
    exit 1
fi

if [[ $# != 2 ]]
then
    usage
    exit 1
fi

ENVIRONMENT=$1
ENVBASE="${INSTALL_BASE}/${ENVIRONMENT}"

if [[ ! -d "${ENVBASE}" ]]
then
    echo "${PGM}:  environment ${ENVIRONMENT} does not exist"
    exit 1
fi

NAMESPACE=$2
NSBASE="${ENVBASE}/${NAMESPACE}"

if [[ ! -d "${NSBASE}" ]]
then
    echo "${PGM}:  namespace ${NAMESPACE} does not exist"
    exit 1
fi

ROUPATH="${NSBASE}/routines"

cp USER/*.m "${ROUPATH}"


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>