summaryrefslogtreecommitdiff
blob: 7bcd820e0b59a0e9349ff619d00dca09e21e4bb6 (plain)
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
#! /bin/sh

BINNAME_LONG="$(basename $0)"
BINNAME="${BINNAME_LONG%-tc}"

if [ -n "${HELIUM_TEMP}" ]; then
	TEMP="${HELIUM_TEMP}";
else
	TEMP="/tmp/helium-${USER}"	
	if ! [ -d "${TEMP}" ]; then
		mkdir ${TEMP};
	fi;
fi

if [ "${BINNAME_LONG}" = "${BINNAME}" ]; then
	HELIUM_LIBS="/usr/lib/helium/lib";
else
	HELIUM_LIBS="/usr/lib/helium/tclib";
fi

if [ -z "${LVMPATH}" ]; then
	LVMPATH=".:${HELIUM_LIBS}";
else
	LVMPATH="${LVMPATH}:${HELIUM_LIBS}";
fi
export LVMPATH
export TEMP

if [ "${BINNAME}" = "hint" ]; then

	JAVA="$(java-config --java)"
        PROGCALL="${JAVA} -jar -DPATH=${PATH} -DLVMPATH=${LVMPATH} /usr/share/helium/lib/Hint.jar"

else

	PROGCALL="/usr/lib/helium/bin/${BINNAME}"

fi

${PROGCALL} $*