Sha256: ced90040d250777c3eac51f6787d9ea5158059732635e128e8998c42765157d5
Contents?: true
Size: 1003 Bytes
Versions: 7
Compression:
Stored size: 1003 Bytes
Contents
#!/usr/bin/env ruby require 'fastlane' require 'match' # CLI to decrypt files using fastlane match encryption layer def usage puts("USAGE: ruby math_decrypt.rb [password] [input_path] [output_path]") exit(-1) end if ARGV.count < 2 || ARGV.count > 3 usage end method_name = 'decrypt' unless ['encrypt', 'decrypt'].include?(method_name) usage end password = ARGV.shift input_file = ARGV.shift if ARGV.count > 0 output_file = ARGV.shift else output_file = input_file end unless File.exist?(input_file) puts "input_file:#{input_file} doesn't exist".red exit end exit if password.empty? begin puts "match encryption method_name:#{method_name} password:#{password} input_file:#{input_file} output_file:#{output_file}" Match::Encryption::MatchFileEncryption.new.send(method_name, file_path: input_file, password: password, output_path: output_file) puts "match decrypted mobileprovision finish!" rescue => e puts("ERROR #{method_name}ing. [#{e}]. Check your password") usage end
Version data entries
7 entries across 7 versions & 1 rubygems