remoting/host/installer/build-installer-archive.py
def copyZipIntoArchive(out_dir, files_root, zip_file):
  """Expands the zip_file into the out_dir, preserving the directory structure.

  Args:
    out_dir: Target directory where unzipped files are copied.
    files_root: Path prefix which is stripped of zip_file before appending
                it to the out_dir.
    zip_file: Relative path (and filename) to the zip file.
  """
  base_zip_name = os.path.basename(zip_file)

  # We don't use the 'zipfile' module here because it doesn't restore all the
  # file permissions correctly. We use the 'unzip' command manually.
  old_dir = os.getcwd();
  os.chdir(os.path.dirname(zip_file))
  subprocess.call(['unzip', '-qq', '-o', base_zip_name])
  os.chdir(old_dir)

  # Unzip into correct dir in out_dir.
  out_zip_path = remapSrcFile(out_dir, files_root, zip_file)
  out_zip_dir = os.path.dirname(out_zip_path)

  (src_dir, ignore1) = os.path.splitext(zip_file)
  (base_dir_name, ignore2) = os.path.splitext(base_zip_name)
  shutil.copytree(src_dir, os.path.join(out_zip_dir, base_dir_name))
Expands the zip_file into the out_dir, preserving the directory structure.

  Args:
    out_dir: Target directory where unzipped files are copied.
    files_root: Path prefix which is stripped of zip_file before appending
                it to the out_dir.
    zip_file: Relative path (and filename) to the zip file.
  
Expands the zip_file into the out_dir, preserving the directory structure.
Expands the zip_file into the out_dir preserving the directory structure .
def copyZipIntoArchive(out_dir, files_root, zip_file):
  base_zip_name = os.path.basename(zip_file)
  old_dir = os.getcwd();
  os.chdir(os.path.dirname(zip_file))
  subprocess.call(['unzip', '-qq', '-o', base_zip_name])
  os.chdir(old_dir)
  out_zip_path = remapSrcFile(out_dir, files_root, zip_file)
  out_zip_dir = os.path.dirname(out_zip_path)
  (src_dir, ignore1) = os.path.splitext(zip_file)
  (base_dir_name, ignore2) = os.path.splitext(base_zip_name)
  shutil.copytree(src_dir, os.path.join(out_zip_dir, base_dir_name))
def copyZipIntoArchive ( out_dir , files_root , zip_file ) : base_zip_name = os . path . basename ( zip_file ) old_dir = os . getcwd ( ) ; os . chdir ( os . path . dirname ( zip_file ) ) subprocess . call ( [ 'unzip' , '-qq' , '-o' , base_zip_name ] ) os . chdir ( old_dir ) out_zip_path = remapSrcFile ( out_dir , files_root , zip_file ) out_zip_dir = os . path . dirname ( out_zip_path ) ( src_dir , ignore1 ) = os . path . splitext ( zip_file ) ( base_dir_name , ignore2 ) = os . path . splitext ( base_zip_name ) shutil . copytree ( src_dir , os . path . join ( out_zip_dir , base_dir_name ) )
Expands the zip_file into the out_dir, preserving the directory structure.
Expands the zip_file into the out_dir preserving the directory structure .
"""Expands the zip_file into the out_dir, preserving the directory structure.

  Args:
    out_dir: Target directory where unzipped files are copied.
    files_root: Path prefix which is stripped of zip_file before appending
                it to the out_dir.
    zip_file: Relative path (and filename) to the zip file.
  """ # We don't use the 'zipfile' module here because it doesn't restore all the # file permissions correctly. We use the 'unzip' command manually. # Unzip into correct dir in out_dir.
out_dir
Target directory where unzipped files are copied.
Target directory where unzipped files are copied .
files_root
Path prefix which is stripped of zip_file before appending
it to the out_dir.
Path prefix which is stripped of zip_file before appending it to the out_dir .
zip_file
Relative path (and filename) to the zip file.
Relative path ( and filename ) to the zip file .