[atoms] prevent unzip of spurious __MACOSX under Darwin 16/21116/5
St├ęphane MOTTELET [Tue, 5 Nov 2019 10:57:55 +0000 (11:57 +0100)]
This directory is created when zip archives are made from the Finder,
i.e. not from the command line. It breaks the installation process of
the package, as a single directory is expected after unzip.

http://mailinglists.scilab.org/Scilab-users-lincos-instruction-example-file-pendulum-anim45-zcos-is-corrupted-Buggzilla-16221-tp4039887p4039990.html

Change-Id: I0aa658b1deff9a8c3ad051ae36e7309dabf6d1ef

scilab/modules/atoms/macros/atoms_internals/atomsExtract.sci

index c3e3803..1778eea 100644 (file)
@@ -85,6 +85,10 @@ function dir_created = atomsExtract(archive_in,dir_out)
 
         extract_cmd = extract_cmd + " -q -o """ + archive_in + """ -d """ + pathconvert(dir_out,%F) +"""";
 
+        if getos() == "Darwin"
+            extract_cmd = extract_cmd + " -x __MACOSX/*"
+        end
+
     end
 
     [rep,stat,err] = unix_g(extract_cmd);