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