-B, --print-deps option added.
This commit is contained in:
parent
3483577fa4
commit
7b57a2706d
10
src/main.cr
10
src/main.cr
@ -19,6 +19,7 @@ download_only = false
|
||||
do_not_clean = false
|
||||
watch_only = false
|
||||
skip_build_dependencies = false
|
||||
print_deps = false
|
||||
|
||||
used_X = false
|
||||
OptionParser.parse! do |parser|
|
||||
@ -61,6 +62,10 @@ OptionParser.parse! do |parser|
|
||||
watch_only = true
|
||||
}
|
||||
|
||||
parser.on("-B", "--print-deps", "Prints build dependencies and exits.") {
|
||||
print_deps = true
|
||||
}
|
||||
|
||||
parser.on("-v", "--verbose", "Runs more verbosely.") {
|
||||
context.verbosity += 1
|
||||
}
|
||||
@ -137,6 +142,11 @@ begin
|
||||
end
|
||||
end
|
||||
|
||||
if print_deps
|
||||
puts dependencies.join "\n"
|
||||
exit 0
|
||||
end
|
||||
|
||||
if dependencies.size > 0 && ! skip_build_dependencies && !download_only
|
||||
# FIXME: We’ll probably want to have backends other than apk at some point.
|
||||
opts = ["add"] + (ENV["APK_FLAGS"]? || "-i").split(/[ \t]+/) + dependencies
|
||||
|
Reference in New Issue
Block a user