Modify archquery to be able to print any system property.
(this is change 4207 that was abandoned due to a merge conflict.)
This commit is contained in:
@@ -45,21 +45,28 @@ package com.android.archquery;
|
|||||||
*/
|
*/
|
||||||
public final class Main {
|
public final class Main {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
// Values listed from http://lopica.sourceforge.net/os.html
|
|
||||||
String arch = System.getProperty("os.arch");
|
|
||||||
|
|
||||||
if (arch.equalsIgnoreCase("x86_64") || arch.equalsIgnoreCase("amd64")) {
|
for (String arg : args) {
|
||||||
System.out.print("x86_64");
|
System.out.println(String.format("%1$s: %2$s", arg, System.getProperty(arg)));
|
||||||
|
}
|
||||||
|
|
||||||
} else if (arch.equalsIgnoreCase("x86")
|
if (args.length == 0) {
|
||||||
|| arch.equalsIgnoreCase("i386")
|
// Values listed from http://lopica.sourceforge.net/os.html
|
||||||
|| arch.equalsIgnoreCase("i686")) {
|
String arch = System.getProperty("os.arch");
|
||||||
System.out.print("x86");
|
|
||||||
|
|
||||||
} else if (arch.equalsIgnoreCase("ppc") || arch.equalsIgnoreCase("PowerPC")) {
|
if (arch.equalsIgnoreCase("x86_64") || arch.equalsIgnoreCase("amd64")) {
|
||||||
System.out.print("ppc");
|
System.out.print("x86_64");
|
||||||
} else {
|
|
||||||
System.out.print(arch);
|
} else if (arch.equalsIgnoreCase("x86")
|
||||||
|
|| arch.equalsIgnoreCase("i386")
|
||||||
|
|| arch.equalsIgnoreCase("i686")) {
|
||||||
|
System.out.print("x86");
|
||||||
|
|
||||||
|
} else if (arch.equalsIgnoreCase("ppc") || arch.equalsIgnoreCase("PowerPC")) {
|
||||||
|
System.out.print("ppc");
|
||||||
|
} else {
|
||||||
|
System.out.print(arch);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user