From 27aa5c09902e60eee87d3694aed58d43f365794b Mon Sep 17 00:00:00 2001 From: ebner Date: Tue, 7 Aug 2012 08:43:06 +0200 Subject: [PATCH] issue 102 Use of the "bash -c" command to execute shell script --- ch.psi.fda/.classpath | 38 ++++++++++++++++--- .../ch/psi/fda/core/actions/ShellAction.java | 2 +- 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/ch.psi.fda/.classpath b/ch.psi.fda/.classpath index 0223027..b22ded1 100644 --- a/ch.psi.fda/.classpath +++ b/ch.psi.fda/.classpath @@ -1,11 +1,37 @@ - + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ch.psi.fda/src/main/java/ch/psi/fda/core/actions/ShellAction.java b/ch.psi.fda/src/main/java/ch/psi/fda/core/actions/ShellAction.java index a875919..8e5a23b 100644 --- a/ch.psi.fda/src/main/java/ch/psi/fda/core/actions/ShellAction.java +++ b/ch.psi.fda/src/main/java/ch/psi/fda/core/actions/ShellAction.java @@ -78,7 +78,7 @@ public class ShellAction implements Action{ try{ abort = false; logger.fine("Execute script "+script); - process = Runtime.getRuntime().exec(script); + process = Runtime.getRuntime().exec(new String[]{"/bin/bash","-c",script}); int exitVal = process.waitFor(); // Log output of the shell script if loglevel is finest