Archived
3
0

-n, --ignore-dependencies option added.

This commit is contained in:
Luka Vandervelden 2019-09-03 13:15:07 +02:00
parent 24ff4358d3
commit 33f7ddc263

View File

@ -18,6 +18,7 @@ requested_recipes = [] of String
download_only = false
do_not_clean = false
watch_only = false
skip_build_dependencies = false
used_X = false
OptionParser.parse! do |parser|
@ -68,6 +69,10 @@ OptionParser.parse! do |parser|
context.verbosity -= 1
}
parser.on("-n", "--ignore-dependencies", "Do not try to install build-dependencies.") {
skip_build_dependencies = true
}
parser.invalid_option do |flag|
STDERR.puts "ERROR: #{flag} is not a valid option."
STDERR.puts parser
@ -132,7 +137,7 @@ begin
end
end
if dependencies.size > 0
if dependencies.size > 0 && ! skip_build_dependencies
# FIXME: Well probably want to have backends other than apk at some point.
opts = ["add"] + (ENV["APK_FLAGS"]? || "-i").split(/[ \t]+/) + dependencies
puts "+ apk #{opts.join " "}"