puts 'get attributes.json'\r
attr = nil\r
File.open(attrfn, 'r') do |f|\r
- attr = f.read\r
+ attr = JSON.parse(f.read)\r
end\r
json = JSON.parse(open(ls).read)\r
if json['attributes'] and attr\r
json['attributes'] = attr\r
end\r
File.open(lsfn, 'w') do |f|\r
- f.write json.to_json.to_s\r
+ f.write JSON.pretty_generate(json)\r
end\r
else\r
FileUtils.cp ls, lsfn\r