[Swift-commit] r4809 - trunk/src/org/griphyn/vdl/karajan
hategan at ci.uchicago.edu
hategan at ci.uchicago.edu
Thu Jul 7 19:16:04 CDT 2011
Author: hategan
Date: 2011-07-07 19:16:04 -0500 (Thu, 07 Jul 2011)
New Revision: 4809
Modified:
trunk/src/org/griphyn/vdl/karajan/Loader.java
Log:
for some odd reason the swift version() method migrated to the argument parser
Modified: trunk/src/org/griphyn/vdl/karajan/Loader.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/Loader.java 2011-07-08 00:02:34 UTC (rev 4808)
+++ trunk/src/org/griphyn/vdl/karajan/Loader.java 2011-07-08 00:16:04 UTC (rev 4809)
@@ -92,7 +92,7 @@
System.exit(0);
}
if (ap.isPresent(ARG_VERSION)){
- ap.version();
+ version();
System.exit(0);
}
if (ap.isPresent(ARG_MONITOR)) {
@@ -635,5 +635,27 @@
}
return sb.toString();
}
+
+ public static void version() {
+ String shome = System.getProperty("swift.home", "unknown version, can't determine SWIFT_HOME");
+ File file = new File(shome + "/libexec/version.txt");
+ try {
+ BufferedReader br = new BufferedReader(new FileReader(file));
+ try {
+ String line;
+ while ((line = br.readLine()) != null) {
+ System.out.println(line);
+ }
+ }
+ finally {
+ br.close();
+ }
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ }
+ System.out.println();
+ }
+
}
More information about the Swift-commit
mailing list