aboutsummaryrefslogtreecommitdiffstats
path: root/archquery/src/com/android
diff options
context:
space:
mode:
authorRaphael <raphael@google.com>2009-06-15 13:36:11 -0700
committerRaphael <raphael@google.com>2009-06-15 13:36:11 -0700
commit4b84edd16b440c41f801fcb04c795433e6fd89b8 (patch)
tree9cf4fd3f281a99a32841193b32d68c67305d08ee /archquery/src/com/android
parente9db66762843497f3ab748a63a8df4929b91897a (diff)
downloadsdk-4b84edd16b440c41f801fcb04c795433e6fd89b8.zip
sdk-4b84edd16b440c41f801fcb04c795433e6fd89b8.tar.gz
sdk-4b84edd16b440c41f801fcb04c795433e6fd89b8.tar.bz2
Modify archquery to be able to print any system property.
(this is change 4207 that was abandoned due to a merge conflict.)
Diffstat (limited to 'archquery/src/com/android')
-rw-r--r--archquery/src/com/android/archquery/Main.java33
1 files changed, 20 insertions, 13 deletions
diff --git a/archquery/src/com/android/archquery/Main.java b/archquery/src/com/android/archquery/Main.java
index 5e65ff2..c76cca1 100644
--- a/archquery/src/com/android/archquery/Main.java
+++ b/archquery/src/com/android/archquery/Main.java
@@ -45,21 +45,28 @@ package com.android.archquery;
*/
public final class Main {
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")) {
- System.out.print("x86_64");
+ for (String arg : args) {
+ System.out.println(String.format("%1$s: %2$s", arg, System.getProperty(arg)));
+ }
+
+ if (args.length == 0) {
+ // Values listed from http://lopica.sourceforge.net/os.html
+ String arch = System.getProperty("os.arch");
+
+ if (arch.equalsIgnoreCase("x86_64") || arch.equalsIgnoreCase("amd64")) {
+ System.out.print("x86_64");
- } else if (arch.equalsIgnoreCase("x86")
- || arch.equalsIgnoreCase("i386")
- || arch.equalsIgnoreCase("i686")) {
- System.out.print("x86");
+ } 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);
+ } else if (arch.equalsIgnoreCase("ppc") || arch.equalsIgnoreCase("PowerPC")) {
+ System.out.print("ppc");
+ } else {
+ System.out.print(arch);
+ }
}
}
-} \ No newline at end of file
+}