the viewer script uses the xdg-open program on linux,
i.e. try to find a program that can open the requested file type, and call the program.
native.sh_binary(
name = "{}_view_output".format(name),
srcs = ["@bazel_latex//:view_pdf.sh"],
data = [":{}".format(name)],
args = ["$(location :{})".format(name)] <=== this part how remove the need to use 'find' in the script
tags = tags,
)
the viewer script uses the xdg-open program on linux, i.e. try to find a program that can open the requested file type, and call the program.
native.sh_binary( name = "{}_view_output".format(name), srcs = ["@bazel_latex//:view_pdf.sh"], data = [":{}".format(name)], args = ["$(location :{})".format(name)] <=== this part how remove the need to use 'find' in the script tags = tags, )
then do input_file="$1" xdg-open $input_file