WebHackersWeapons/scripts/for_migration/apply_platform.rb

14 lines
365 B
Ruby
Raw Normal View History

2022-08-19 03:26:26 -04:00
require 'yaml'
Dir.entries("./weapons").each do | name |
if name.strip != "." || name != ".."
begin
data = YAML.load(File.open("./weapons/#{name}"))
data['platform'] = ['linux','macos','windows']
yaml_data = YAML.dump(data)
File.write("./weapons/#{name}", yaml_data)
rescue => e
puts e
end
end
end