directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r635563 - /directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/java/org/apache/directory/daemon/installers/pkg/PkgInstallerCommand.java
Date Mon, 10 Mar 2008 14:14:26 GMT
Author: pamarcelot
Date: Mon Mar 10 07:14:25 2008
New Revision: 635563

URL: http://svn.apache.org/viewvc?rev=635563&view=rev
Log:
Improvement for the final name.

Modified:
    directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/java/org/apache/directory/daemon/installers/pkg/PkgInstallerCommand.java

Modified: directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/java/org/apache/directory/daemon/installers/pkg/PkgInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/java/org/apache/directory/daemon/installers/pkg/PkgInstallerCommand.java?rev=635563&r1=635562&r2=635563&view=diff
==============================================================================
--- directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/java/org/apache/directory/daemon/installers/pkg/PkgInstallerCommand.java
(original)
+++ directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/java/org/apache/directory/daemon/installers/pkg/PkgInstallerCommand.java
Mon Mar 10 07:14:25 2008
@@ -282,6 +282,11 @@
 
         // Generating the DMG
         log.info( "Generating Mac OS X DMG Installer" );
+        String finalName = target.getFinalName();
+        if ( !finalName.endsWith( ".pkg" ) )
+        {
+            finalName = finalName + ".pkg";
+        }
         try
         {
             Execute createDmgTask = new Execute();
@@ -293,8 +298,7 @@
             createDmgTask.execute();
 
             createDmgTask.setCommandline( new String[]
-                { hdiutilUtility.getAbsolutePath(), "convert", "-format", "UDZO", "TMP.dmg",
"-o",
-                    "../" + target.getFinalName() + ".dmg" } );
+                { hdiutilUtility.getAbsolutePath(), "convert", "-format", "UDZO", "TMP.dmg",
"-o", "../" + finalName } );
             createDmgTask.execute();
 
         }
@@ -304,7 +308,7 @@
             throw new MojoFailureException( "Failed while trying to generate the DMG: " +
e.getMessage() );
         }
 
-        log.info( "Mac OS X DMG generated at " + new File( imagesDirectory, target.getFinalName()
+ ".dmg" ) );
+        log.info( "Mac OS X DMG generated at " + new File( imagesDirectory, finalName ) );
     }
 
 



Mime
View raw message