File: gnumed

package info (click to toggle)
gnumed-client 1.8.5%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 37,672 kB
  • sloc: python: 126,459; javascript: 6,113; sh: 1,192; xml: 36; makefile: 33
file content (67 lines) | stat: -rwxr-xr-x 1,892 bytes parent folder | download | duplicates (3)
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
63
64
65
66
67
#!/bin/bash

#==================================================
# This shell script is intended to be placed in
# /usr/bin/ and should be run to start a GNUmed
# client.
#
# license: GPL v2 or later
# Karsten Hilbert, Sebastian Hilbert, Andreas Tille
#--------------------------------------------------

# for debugging this script
# set -x

OPTIONS=$@


# The system-wide configuration file for backend profiles.
SYSCONF="/etc/gnumed/gnumed-client.conf"
if [ ! -e ${SYSCONF} ] ; then
	echo "Global config file ${SYSCONF} missing."
	exit 1
fi


# packages which install the GNUmed python modules into a path not
# already accessible for imports via sys.path (say, /usr/share/gnumed/)
# may need to adjust PYTHONPATH appropriately here
export PYTHONPATH="${PYTHONPATH:+$PYTHONPATH:}/usr/share/gnumed/:/usr/share/gnumed/Gnumed/"


# packages which install the GNUmed helper scripts into a
# path not already accessible via PATH (say, /usr/share/gnumed/bin)
# may need to adjust PATH appropriately here
export PATH="${PATH}:/usr/share/gnumed/bin"


# 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/scripts/gnumed-startup-local.sh ] ; then
	. ${HOME}/.gnumed/scripts/gnumed-startup-local.sh
fi


# now run the client
export PYTHONIOENCODING=utf-8:surrogateescape
python3 -m Gnumed.gnumed ${OPTIONS}


# source systemwide shutdown extension shell script if it exists
if [ -r /etc/gnumed/gnumed-shutdown-local.sh ] ; then
	. /etc/gnumed/gnumed-shutdown-local.sh
fi


# source local shutdown extension shell script if it exists
if [ -r ${HOME}/.gnumed/scripts/gnumed-shutdown-local.sh ] ; then
	. ${HOME}/.gnumed/scripts/gnumed-shutdown-local.sh
fi


#==================================================