blob: 7a42c856c359337318b9eccf94372fd7bcaebe53 [file]
# Copyright 2023 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/python/python_action.gni")
# Compress a file with gzip.
#
# Parameters
#
# input
# Required: Path to the file to compress
# Type: path
#
# output
# Required: Path to the compressed file.
# Type: path
template("gzip") {
assert(defined(invoker.input), "Must specify input")
assert(defined(invoker.output), "Must specify output")
python_action(target_name) {
forward_variables_from(invoker,
[
"testonly",
"visibility",
"deps",
])
binary_label = "//build/tools/gzip"
sources = [ invoker.input ]
outputs = [ invoker.output ]
args = [
"--input",
rebase_path(invoker.input, root_build_dir),
"--output",
rebase_path(invoker.output, root_build_dir),
]
}
}