#!/bin/sh # # eg-neo-config # a script to query about variables used in eg-neo # compile and install. # By Ben Allan (baallan@ca.sandia.gov) 3/26/2003 # # eg-neo-config [--dump] [--varlist] [--var NAME] [--version] # --dump : produce the complete sh-compatible var assignments. # --varlist: produce the list of variable names. # --var NAME: produce the value of the NAMEd variable, if defined. # --version: tell about this script. Usage=" $0 [--dump] [--varlist] [--var NAME] [--version]" # # construct the location of the input vars # based on data from configure # EGNEO_VERSION=0.9.0 egneover=0.9.0 suffix="-${EGNEO_VERSION}" egneosuffix="-${egneover}" installsuffix="-${EGNEO_VERSION}" varfile=EG_Neo_Vars.sh insdir=/home/jacklm/cca/workspace/trunk/install/csn/share/eg-neo-0.9.0 insfile=$insdir/$varfile configversion=0.1.0 if test -z "$1" ; then echo $Usage exit 0 fi if test "$1" = "--help"; then echo $Usage exit 0 fi if test "$1" = "-h"; then echo $Usage exit 0 fi if test "$1" = "--dump"; then cat $insfile |grep -v '^#' exit 0 fi if test "$1" = "--varlist"; then cat $insfile |grep -v '^#' | sed -e 's;=.*;;' exit 0 fi if test "$1" = "--version"; then echo "$configversion" exit 0 fi # # delete the var requested if inherited from the # callers environment. # if test "$1" = "--var"; then unset $2 fi # # read our config vars # . $insfile # # tell something about them # if test "$1" = "--var"; then s="\${$2:?Not_A_EGNEO_Spec_Config_Variable}" s2=`echo $s` config_tmp_val=`eval echo $s2` echo $config_tmp_val fi exit 0