Thinking about the problem... I think about writing a small program to compress 
a directory.
Here is the pseudocode I have come up to now:

Function compress_topdir(path)
  if path reference a zip file
    decompress zip file to some_dir
    compress_dir(some_dir)
  else
    compress_dir(path)

Function compress_dir(dir)
  if dir contains only one directory file /* Gitlab zip file */
    compress_dir(dir,"")
  else
    compress_dir(dir,dir)

Function compress_dir (dir, tuncated_path)
  For each file in dir hereby named f
    f_truncated=truncate_name(f) /* to 8.3 format */
    if f is a dir
      truncated_path = truncated_path + '/' + f_truncated
      add truncated_path/f_truncated empty directory to zip
      compress_dir(dir, truncated_path)
    else /* a file */
      copy dir/f to a temporary file named f_truncated
      update zip by adding truncated_path + "/" + f_truncated
      delete temporary file named f_truncated

Hope it make some sense... and that you don't feel flooded with useless 
information.
Might consider to make it as a Perl script.
Mostly because I consider learning Rakudo (Perl v. 6).... but really would do 
it in plain Perl v.5. for it is installed on most Linux.


_______________________________________________
Freedos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to