axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prest...@apache.org
Subject svn commit: r385841 - /webservices/axis/trunk/c/tools/org/apache/axis/tools/asc4Ant/asc4Ant.java
Date Tue, 14 Mar 2006 17:35:42 GMT
Author: prestonf
Date: Tue Mar 14 09:35:39 2006
New Revision: 385841

URL: http://svn.apache.org/viewcvs?rev=385841&view=rev
Log:
Changes to java for Unix platforms

Modified:
    webservices/axis/trunk/c/tools/org/apache/axis/tools/asc4Ant/asc4Ant.java

Modified: webservices/axis/trunk/c/tools/org/apache/axis/tools/asc4Ant/asc4Ant.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tools/org/apache/axis/tools/asc4Ant/asc4Ant.java?rev=385841&r1=385840&r2=385841&view=diff
==============================================================================
--- webservices/axis/trunk/c/tools/org/apache/axis/tools/asc4Ant/asc4Ant.java (original)
+++ webservices/axis/trunk/c/tools/org/apache/axis/tools/asc4Ant/asc4Ant.java Tue Mar 14 09:35:39
2006
@@ -27,25 +27,30 @@
         
 	        try
 	        {
-	            String osName = System.getProperty("os.name");
-	            String cmdPrefix = "";
-	
-	            if( osName.startsWith( "Windows"))
-	            {
-	                cmdPrefix = "cmd /C ";
-	            }
-	            else
-	            {
-	                System.out.println( "Oh oh, haven't done that yet!");
-	            }
-	            
 	            if( new File( filename).exists())
 	            {
-		            String cmdLine = cmdPrefix + "gpg --no-secmem-warning --yes --armor --passphrase-fd
0 --output " + filename + ".asc --detach-sig " + filename + " < " + passwordFile;
-		            Runtime rt = Runtime.getRuntime();
-		            Process proc = rt.exec( cmdLine);
+    	                String osName = System.getProperty("os.name");
+	                String gpgCommand = "gpg --no-secmem-warning --yes --armor --passphrase-fd
0 --output " + filename + ".asc --detach-sig " + filename + " < " + passwordFile;
+	                Runtime rt = Runtime.getRuntime();
+                        Process proc = null;
+	
+	                if( osName.startsWith( "Windows"))
+	                {
+                            String cmdLine = "cmd /C " + gpgCommand;
+
+	                    proc = rt.exec( cmdLine);
+	                }
+                        else
+                        {
+	                    String [] cmdLine = {"/bin/sh", "-c", gpgCommand};
+
+	                    proc = rt.exec( cmdLine);
+	                }
+	            
 		            
-	                proc.waitFor();
+                        proc.waitFor();
+
+                        System.out.println( "Done");
 	            }
 	        }
 	        catch( Throwable t)



Mime
View raw message