You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
371 B
20 lines
371 B
8 years ago
|
#!/usr/bin/env ruby
|
||
|
|
||
8 years ago
|
require 'tempfile'
|
||
8 years ago
|
|
||
8 years ago
|
plist = ARGF.read
|
||
|
Tempfile.create('info.plist') do |f|
|
||
|
f << plist
|
||
|
f.flush
|
||
8 years ago
|
|
||
8 years ago
|
vars = `/usr/libexec/PlistBuddy -c "Print :variablesdontexport" #{f.path}`
|
||
|
vars = vars.split("\n")[1..-2].map(&:strip)
|
||
|
|
||
|
vars.each do |var|
|
||
|
`/usr/libexec/PlistBuddy -c "Set :variables:#{var} ''" #{f.path}`
|
||
|
end
|
||
8 years ago
|
|
||
8 years ago
|
f.rewind
|
||
|
puts f.read
|
||
|
end
|