1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
#!/bin/sh
#==================================================
# This shell script is intended to be placed in
# /usr/bin/ and should be run to start a GNUmed
# client.
#
# $Source: /sources/gnumed/gnumed/gnumed/dists/Linux/gnumed,v $
# $Id: gnumed,v 1.4 2005/07/11 16:55:27 ncq Exp $
# license: GPL
# Karsten Hilbert, Sebastian Hilbert
#--------------------------------------------------
# set -x
CONFSOURCE="/etc/gnumed/gnumed.conf"
echo "GNUmed startup"
# - make sure standard config file is there
# - people using --conf-file=<FILE> are on their own
if [ ! -s ${HOME}/.gnumed/gnumed.conf ] ; then
if [ ! -e ${CONFSOURCE} ] ; then
echo "Global config file ${CONFSOURCE} missing."
else
cp -Rv ${CONFSOURCE} ${HOME}/.gnumed/gnumed.conf
fi
fi
# this ugly hack needs to go once we use proper
# distutil installation for the Python part
export PYTHONPATH="${PYTHONPATH}:/usr/lib/python/site-packages/Gnumed:/usr/lib/python/site-packages/Gnumed/wxpython:/usr/lib/python/site-packages/Gnumed/pycommon"
# source systemwide startup extension shell script if it exists
if [ -r /etc/gnumed/gnumed-startup-local.sh ] ; then
. /etc/gnumed/gnumed-startup-local.sh
fi
# source local startup extension shell script if it exists
if [ -r ${HOME}/.gnumed/gnumed-startup-local.sh ] ; then
. ${HOME}/.gnumed/gnumed-startup-local.sh
fi
# now run a client
python /usr/lib/python/site-packages/Gnumed/wxpython/gnumed.py $@
#--unicode-gettext=0
#--log-file=somewhere.log
#--conf-file=somewhere.conf
#--debug
#==================================================
# $Log: gnumed,v $
# Revision 1.4 2005/07/11 16:55:27 ncq
# - allow systemwide startup extension shell script, too
#
# Revision 1.3 2005/07/11 16:53:03 ncq
# - include user-local startup shell script
# - use cp -R
#
# Revision 1.2 2005/07/11 16:46:41 ncq
# - make more dumb but more robust
#
|