ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | byline-commits List | September 2004 Index

<--  Date Index  --> <--  Thread Index  -->

r22 - tools/scripts/trunk/bin


Author: dgregoro
Date: 2004-09-15 21:09:23 +0200 (Wed, 15 Sep 2004)
New Revision: 22

Modified:
   tools/scripts/trunk/bin/make-source
Log:
only create directories if needed, and check for errors

Modified: tools/scripts/trunk/bin/make-source
===================================================================
--- tools/scripts/trunk/bin/make-source 2004-09-10 23:18:53 UTC (rev 21)
+++ tools/scripts/trunk/bin/make-source 2004-09-15 19:09:23 UTC (rev 22)
@@ -135,7 +135,14 @@
 &make_tar() if ( !$just_zip && !$no_tar );
 
 sub make_zip {
-    mkpath($ccm_dist_zip_dir);
+    unless (-d $ccm_dist_zip_dir) {
+        eval {
+            mkpath($ccm_dist_zip_dir);
+        };
+        if ($@) {
+            die "could not create directory '$ccm_dist_zip_dir': $@";
+        }
+    }
     # make the source distribution (zip and maybe tar.gz)
     print "  creating zip file distribution\n";
     my $filename;
@@ -152,7 +159,14 @@
 }
 
 sub make_tar {
-    mkpath($ccm_dist_tar_dir);
+    unless (-d $ccm_dist_tar_dir) {
+        eval {
+            mkpath($ccm_dist_tar_dir);
+        };
+        if ($@) {
+            die "could not create directory '$ccm_dist_tar_dir': $@";
+        }
+    }
     print "  creating tar.gz file distribution\n";
     my $filename = 
File::Spec->catfile($ccm_dist_tar_dir,"$ccm_package_name.tar");
     unlink $filename;




<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.