6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/applyrics/tools/ibtool.rb', line 6
def run(folder, output_folder=nil)
output_folder = folder if output_folder.nil?
folder = File.expand_path(folder)
output_folder = File.expand_path(output_folder)
files = files(folder)
files.each do |file|
filename = File.basename(file, ".*")
output_file = File.join(output_folder, filename) + ".strings"
cmd = ["set -o pipefail &&"]
cmd << Command.which("ibtool")
cmd << "--export-strings-file " + Shellwords.escape("#{output_file}")
cmd << Shellwords.escape("#{file}")
puts Command.execute(cmd)
end
end
|