changeset 6020:f542445f6b7a

[project @ 2006-10-02 19:24:08 by dbateman]
author dbateman
date Mon, 02 Oct 2006 19:24:08 +0000
parents f717f9e37d8f
children 60f9ced8ab53
files scripts/ChangeLog scripts/pkg/pkg.m
diffstat 2 files changed, 13 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Mon Oct 02 17:44:43 2006 +0000
+++ b/scripts/ChangeLog	Mon Oct 02 19:24:08 2006 +0000
@@ -1,3 +1,7 @@
+2006-10-02  David Bateman  <dbateman@free.fr>
+
+	* pkg/pkg.m (copy_files): always create installation directory.
+
 2006-10-02  Thomas Weber  <thomas.weber.mail@gmail.com>
 
 	* miscellaneous/doc.m: Swap file and directory args to info.
--- a/scripts/pkg/pkg.m	Mon Oct 02 17:44:43 2006 +0000
+++ b/scripts/pkg/pkg.m	Mon Oct 02 19:24:08 2006 +0000
@@ -591,15 +591,17 @@
 endfunction
 
 function copy_files (desc, packdir, bindir)
+    ## Create the installation directory
+    if (! exist (desc.dir, "dir"))
+      [status, output] = mkdir (desc.dir);
+      if (status != 1)
+	error("Couldn't create installation directory %s : %s\n", 
+	      desc.dir, output);
+      endif
+    endif
+
     ## Copy the files from "inst" to installdir
     if (! dirempty([packdir "inst"]))
-      if (! exist (desc.dir, "dir"))
-	[status, output] = mkdir (desc.dir);
-        if (status != 1)
-	   error("Couldn't create installation directory %s : %s\n", 
-	         desc.dir, output);
-        endif
-      endif
       [status, output] = system(["cp -R " packdir "inst/* " desc.dir]);
       if (status != 0)
           rm_rf(desc.dir);