ProdriveTechnologies / bazel-latex

Bazel build system rules for LaTeX
Apache License 2.0
73 stars 35 forks source link

make the viewer helper scripts file agnostic #86

Closed solsjo closed 1 year ago

solsjo commented 2 years ago

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