You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by pr...@apache.org on 2006/03/14 18:35:42 UTC

svn commit: r385841 - /webservices/axis/trunk/c/tools/org/apache/axis/tools/asc4Ant/asc4Ant.java

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)