From c7da892cb23d50d4d85746c9a0b6b14bf570989d Mon Sep 17 00:00:00 2001 From: Adrian Dudau Date: Thu, 26 Jun 2014 13:23:09 +0200 Subject: initial commit for Enea Linux 4.0 Migrated from the internal git server on the daisy-enea branch Signed-off-by: Adrian Dudau --- .../src/org/yocto/remote/utils/YoctoCommand.java | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/YoctoCommand.java (limited to 'plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/YoctoCommand.java') diff --git a/plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/YoctoCommand.java b/plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/YoctoCommand.java new file mode 100644 index 0000000..23292d8 --- /dev/null +++ b/plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/YoctoCommand.java @@ -0,0 +1,63 @@ +/******************************************************************************* + * Copyright (c) 2013 Intel Corporation. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Ioana Grigoropol(Intel) - initial API and implementation + *******************************************************************************/ +package org.yocto.remote.utils; + + +public class YoctoCommand { + private String command; + private String initialDirectory; + private String arguments; + private ProcessStreamBuffer processBuffer; + + public YoctoCommand(String command, String initialDirectory, String arguments){ + this.setCommand(command); + this.setInitialDirectory(initialDirectory); + this.setArguments(arguments); + this.setProcessBuffer(new ProcessStreamBuffer(false)); + } + + public String getCommand() { + return command; + } + + public void setCommand(String command) { + this.command = "bash -l -c \"" + command + "\""; + } + + public String getInitialDirectory() { + return initialDirectory; + } + + public void setInitialDirectory(String initialDirectory) { + this.initialDirectory = initialDirectory; + } + + public String getArguments() { + return arguments; + } + + public void setArguments(String arguments) { + this.arguments = arguments; + } + + public ProcessStreamBuffer getProcessBuffer() { + return processBuffer; + } + + public void setProcessBuffer(ProcessStreamBuffer processBuffer) { + this.processBuffer = processBuffer; + } + + @Override + public String toString() { + return command + " " + arguments; + } +} -- cgit v1.2.3-54-g00ecf