diff scripts/pkg/pkg.m @ 6254:5b43c2332b69

[project @ 2007-01-29 17:35:15 by jwe]
author jwe
date Mon, 29 Jan 2007 17:35:15 +0000
parents 738c97e101eb
children ea3a7e8469e9
line wrap: on
line diff
--- a/scripts/pkg/pkg.m	Wed Jan 24 20:43:37 2007 +0000
+++ b/scripts/pkg/pkg.m	Mon Jan 29 17:35:15 2007 +0000
@@ -765,6 +765,16 @@
        error("Couldn't copy COPYING: %s", output);
     endif
 
+    ## If the file ChangeLog exists, copy it
+    fChangeLog = fullfile(packdir, "ChangeLog");
+    if (exist(fChangeLog, "file"))
+        [status, output] = copyfile(fChangeLog, packinfo);
+        if (status != 1)
+            rm_rf(desc.dir);
+            error("Couldn't copy ChangeLog file: %s", output);
+        endif
+    endif
+
     ## Is there an INDEX file to copy or should we generate one?
     fINDEX = fullfile(packdir, "INDEX");
     if (exist(fINDEX, "file"))
@@ -775,8 +785,7 @@
         endif
     else
         try
-            write_INDEX(desc, fullfile(packdir, "inst"), fullfile(packinfo, "IND
-EX"));
+            write_INDEX(desc, fullfile(packdir, "inst"), fullfile(packinfo, "INDEX"));
         catch
             rm_rf(desc.dir);
             error(lasterr);