Sha256: 60599acc24ba26fa829ccd6603648c149fbe74a5f8b49fed67db7d23c47c6a66

Contents?: true

Size: 536 Bytes

Versions: 12

Compression:

Stored size: 536 Bytes

Contents

module PodPrebuild
  module ZipUtils
    def self.zip(path, to_dir: nil)
      basename = File.basename(path)
      out_path = to_dir.nil? ? "#{basename}.zip" : "#{to_dir}/#{basename}.zip"
      cmd = []
      cmd << "cd" << File.dirname(path)
      cmd << "&& zip -r --symlinks" << out_path << basename
      cmd << "&& cd -"
      `#{cmd.join(" ")}`
    end

    def self.unzip(path, to_dir: nil)
      cmd = []
      cmd << "unzip -q" << path
      cmd << "-d" << to_dir unless to_dir.nil?
      `#{cmd.join(" ")}`
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
cocoapods-binary-cache-0.1.14 lib/command/helper/zip.rb
cocoapods-binary-cache-0.1.13 lib/command/helper/zip.rb
cocoapods-binary-cache-0.1.12 lib/command/helper/zip.rb
cocoapods-binary-cache-0.1.11 lib/command/helper/zip.rb
cocoapods-binary-cache-0.1.10 lib/command/helper/zip.rb
cocoapods-binary-cache-0.1.9 lib/command/helper/zip.rb
cocoapods-binary-cache-0.1.8 lib/command/helper/zip.rb
cocoapods-binary-cache-0.1.7 lib/command/helper/zip.rb
cocoapods-binary-cache-0.1.6 lib/command/helper/zip.rb
cocoapods-binary-cache-0.1.5 lib/command/helper/zip.rb
cocoapods-binary-cache-0.1.3 lib/command/helper/zip.rb
cocoapods-binary-cache-0.1.2 lib/command/helper/zip.rb