SC-F001 way better logging and parameters. not integrated yet but.
This commit is contained in:
18
managed_components/esp-idf-lib__i2cdev/bin/eil-q
Normal file
18
managed_components/esp-idf-lib__i2cdev/bin/eil-q
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
require "pathname"
|
||||
require "yaml"
|
||||
|
||||
# A simple CLI to get values in .eil.yml
|
||||
|
||||
key = ARGV.shift
|
||||
project_root = Pathname.new(File.expand_path(__FILE__)).parent.parent
|
||||
eil_file = project_root / ".eil.yml"
|
||||
doc = YAML.safe_load(File.read eil_file)
|
||||
|
||||
case key
|
||||
when "copyright_string"
|
||||
puts doc["copyrights"].map { |e| "#{e['year']}, #{e['name']}" }.join(", ")
|
||||
else
|
||||
puts doc[key]
|
||||
end
|
||||
Reference in New Issue
Block a user