rust-raspberrypi-OS-tutorials/utils/sanity_checks.rb

17 lines
274 B
Ruby
Raw Normal View History

2018-12-29 23:20:24 +00:00
#!/usr/bin/env ruby
def sanity_checks
crates = Dir["**/Cargo.toml"].sort!
crates.each do |x|
if File.readlines(x).grep(/patch.crates-io/).size > 0
puts "#{x} contains patch.crates-io!"
exit(1)
end
end
end
if __FILE__ == $0
sanity_checks()
end