diff options
author | Rob Taylor <rob.taylor@codethink.co.uk> | 2007-07-31 23:54:30 +0100 |
---|---|---|
committer | Rob Taylor <rob.taylor@codethink.co.uk> | 2007-08-01 01:09:37 +0100 |
commit | fed8f45ce82ffaf42e3d20e275c4f490dc8c2b25 (patch) | |
tree | 370e0ebf4ef5b4a62ab3d58fd723eb3ab0b66439 | |
parent | a745bd13c8df49777cd1b2919f18bfa2d4bd8c34 (diff) |
add --debug option to run-ohm.sh
Adds an extra option --debug to run-ohm.sh that runs ohmd in gdb, passing in --no-daemon -- verbose and the remaining flags as the arguments to run with.
-rwxr-xr-x | ohmd/run-ohm.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ohmd/run-ohm.sh b/ohmd/run-ohm.sh index c906553..86e5ad7 100755 --- a/ohmd/run-ohm.sh +++ b/ohmd/run-ohm.sh @@ -9,7 +9,14 @@ else 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 -sudo ./ohmd --no-daemon --verbose $@ +$commandline |