summaryrefslogtreecommitdiffstats
path: root/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/wizards/bsp/QemuArchGetter.java
blob: e2356958ae5382094ce77e0ebcbff609c5dd853f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package org.yocto.sdk.remotetools.wizards.bsp;

/**
 * BSPThread that processes the output of running "yocto-bsp list qemu property qemuarch"
 * @author ioana.grigoropol
 *
 */
public class QemuArchGetter extends BSPThread {

	public QemuArchGetter(String command) {
		super(command);
	}

	@Override
	protected String[] processLine(String line) {
		if (!line.startsWith("["))
			return new String[]{ERROR, line + "\n"};

		String[] values = line.split(",");

		String value = values[0];
		value = value.replace("[\"", "");
		value = value.replaceAll("\"$", "");
		return new String[]{SUCCESS, value};
	}

}