summaryrefslogtreecommitdiff
path: root/ohmd/run-ohm.sh
blob: 86e5ad7edbb448a6ff2a70764b01aead55cf9ec0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

OHM_TMPDIR=/tmp/run-ohmd-$USER

if [ "$1" = "--skip-plugin-install" ] ; then
	shift
else
	make -C ../etc install DESTDIR=$OHM_TMPDIR prefix=/
	make -C ../plugins install DESTDIR=$OHM_TMPDIR prefix=/
fi

if [ "$1" = "--debug" ] ; then
	shift
	commandline="sudo gdb --args ./ohmd --no-daemon --verbose $@"
else
	commandline="sudo ./ohmd --no-daemon --verbose $@"
fi

export OHM_CONF_DIR=$OHM_TMPDIR/etc/ohm
export OHM_PLUGIN_DIR=$OHM_TMPDIR/lib/ohm

$commandline