Obsolete
/
packaging
Archived
3
0
Fork 0

print context, simple pp! for now, better display later

master
Karchnu 2021-02-22 00:32:29 +01:00
parent 4decf96f10
commit 492ce2f9cc
1 changed files with 11 additions and 0 deletions

View File

@ -19,6 +19,8 @@ do_not_clean = false
watch_only = false watch_only = false
skip_build_dependencies = false skip_build_dependencies = false
print_deps = false print_deps = false
only_print_configuration = false
used_X = false used_X = false
OptionParser.parse do |parser| OptionParser.parse do |parser|
@ -77,6 +79,10 @@ OptionParser.parse do |parser|
skip_build_dependencies = true skip_build_dependencies = true
} }
parser.on("-p", "--print-configuration", "Only print configuration.") {
only_print_configuration = true
}
parser.invalid_option do |flag| parser.invalid_option do |flag|
STDERR.puts "ERROR: #{flag} is not a valid option." STDERR.puts "ERROR: #{flag} is not a valid option."
STDERR.puts parser STDERR.puts parser
@ -95,6 +101,11 @@ elsif configuration_file_requested
exit 1 exit 1
end end
if only_print_configuration
pp! context
exit 0
end
found_recipes = requested_recipes.map do |name| found_recipes = requested_recipes.map do |name|
context.find_recipe(name) || name context.find_recipe(name) || name
end end