view octave-config.in @ 4337:d56e0d75e7c9 ss-2-1-45

[project @ 2003-02-19 21:20:19 by jwe]
author jwe
date Wed, 19 Feb 2003 21:20:19 +0000
parents d68c34dc9c25
children aa345723c698
line wrap: on
line source

#! /bin/sh -
#
# octave-config - reports some configuration values for Octave
#
# Rafael Laboissiere <rafael@laboissiere.net>
# This script is in the public domain

VERSION="%OCTAVE_VERSION%"
OCT_SITE_DIR="%OCTAVE_LOCALVEROCTFILEDIR%"
M_SITE_DIR="%OCTAVE_LOCALVERFCNFILEDIR%"

usage_msg="usage: octave-config [options]"

if [ $# -eq 0 ]; then
  echo "$usage_msg" 1>&2
  exit 1
fi

for arg
do
  case "$1" in
    -h | -\? | --help)
      echo "$usage_msg"
      cat << EOF

Options:

  -h, -?, --help      Print this message.

  --m-site-dir        Print the name of the directory where Octave
                      expects to find locally installed .m files.

  --oct-site-dir      Print the name of the directory where Octave
                      expects to find locally installed .oct files.

  -v, --version       Print the Octave version number.

EOF
      exit 0
    ;;
    --m-site-dir)
      echo $M_SITE_DIR
    ;;
    --oct-site-dir)
      echo $OCT_SITE_DIR
    ;;
    -v | --version)
      echo $VERSION
    ;;
    *)
      echo "octave-config: unrecognized argument $1" 2>&1
      exit 1
    ;;
  esac
  shift
done