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 (3 months ago) by snw
Branches: MAIN
CVS tags: HEAD
Update install script

    1: #!/usr/bin/env bash
    2: 
    3: PGM=$(basename $0 .sh)
    4: INSTALL_BASE=/usr/local/var/freem
    5: 
    6: 
    7: function usage()
    8: {
    9:     echo "usage:  $0 <environment> <namespace>"
   10: }
   11: 
   12: if [[ ! -d ${INSTALL_BASE} ]]
   13: then
   14:     echo "${PGM}:  ${INSTALL_BASE} does not exist"
   15:     exit 1
   16: fi
   17: 
   18: if [[ $# != 2 ]]
   19: then
   20:     usage
   21:     exit 1
   22: fi
   23: 
   24: ENVIRONMENT=$1
   25: ENVBASE="${INSTALL_BASE}/${ENVIRONMENT}"
   26: 
   27: if [[ ! -d "${ENVBASE}" ]]
   28: then
   29:     echo "${PGM}:  environment ${ENVIRONMENT} does not exist"
   30:     exit 1
   31: fi
   32: 
   33: NAMESPACE=$2
   34: NSBASE="${ENVBASE}/${NAMESPACE}"
   35: 
   36: if [[ ! -d "${NSBASE}" ]]
   37: then
   38:     echo "${PGM}:  namespace ${NAMESPACE} does not exist"
   39:     exit 1
   40: fi
   41: 
   42: ROUPATH="${NSBASE}/routines"
   43: 
   44: cp USER/*.m "${ROUPATH}"
   45: 

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