awips2/edexOsgi/com.raytheon.uf.tools.cli/impl/mhsAckNotify
Steve Harris 9f8cb727a5 12.4.1-10 baseline
Former-commit-id: bf53d06834caa780226121334ac1bcf0534c3f16
2012-05-01 18:06:13 -05:00

31 lines
1.1 KiB
Bash

#!/bin/bash
##############################################################################
# Provides a simple wrapper to the mhsAckNotify Python module allowing that module
# to be executed as a command line tool without requiring the .py extension.
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 04/06/2012 10388 mhuang Initial creation
##############################################################################
# this allows you to run this script from outside of ./bin
path_to_script=`readlink -f $0`
RUN_FROM_DIR=`dirname $path_to_script`
BASE_AWIPS_DIR=`dirname $RUN_FROM_DIR`
# source the env
source ${RUN_FROM_DIR}/setup.env
# setup the environment needed to run the the Python
export LD_LIBRARY_PATH=${BASE_AWIPS_DIR}/src/lib:${PYTHON_INSTALL}/lib
export PYTHONPATH=${RUN_FROM_DIR}/src:$PYTHONPATH
# execute the Python module
_PYTHON="${PYTHON_INSTALL}/bin/python"
_MODULE="${RUN_FROM_DIR}/src/qpidNotify/mhsAckNotify.py"
# quoting of '$@' is used to prevent command line interpretation
$_PYTHON $_MODULE "$@"