diff options
author | Tudor Florea <tudor.florea@enea.com> | 2014-10-10 03:49:30 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2014-10-10 03:49:30 +0200 |
commit | ede215cf93ba81c963ae62d665d0f32c9407551c (patch) | |
tree | 4a6dc80f259bccb8ff8b76d31e6cc8794bd97a2b /plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/wizards/bsp/QemuArchGetter.java | |
download | eclipse-poky-kepler-daisy-140929.tar.gz |
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/wizards/bsp/QemuArchGetter.java')
-rw-r--r-- | plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/wizards/bsp/QemuArchGetter.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/wizards/bsp/QemuArchGetter.java b/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/wizards/bsp/QemuArchGetter.java new file mode 100644 index 0000000..e235695 --- /dev/null +++ b/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/wizards/bsp/QemuArchGetter.java | |||
@@ -0,0 +1,27 @@ | |||
1 | package org.yocto.sdk.remotetools.wizards.bsp; | ||
2 | |||
3 | /** | ||
4 | * BSPThread that processes the output of running "yocto-bsp list qemu property qemuarch" | ||
5 | * @author ioana.grigoropol | ||
6 | * | ||
7 | */ | ||
8 | public class QemuArchGetter extends BSPThread { | ||
9 | |||
10 | public QemuArchGetter(String command) { | ||
11 | super(command); | ||
12 | } | ||
13 | |||
14 | @Override | ||
15 | protected String[] processLine(String line) { | ||
16 | if (!line.startsWith("[")) | ||
17 | return new String[]{ERROR, line + "\n"}; | ||
18 | |||
19 | String[] values = line.split(","); | ||
20 | |||
21 | String value = values[0]; | ||
22 | value = value.replace("[\"", ""); | ||
23 | value = value.replaceAll("\"$", ""); | ||
24 | return new String[]{SUCCESS, value}; | ||
25 | } | ||
26 | |||
27 | } | ||