1load("//build/bazel/rules:sh_binary.bzl", "sh_binary") 2 3sh_library( 4 name = "lib1", 5 srcs = ["lib1.sh"], 6) 7 8sh_library( 9 name = "lib2", 10 srcs = ["lib2.sh"], 11 deps = [":lib3"], 12) 13 14sh_library( 15 name = "lib3", 16 srcs = ["lib3.sh"], 17) 18 19sh_binary( 20 name = "bin_with_deps", 21 srcs = ["bin_with_deps.sh"], 22 deps = [ 23 "lib1", 24 "lib2", 25 ], 26) 27 28genrule( 29 name = "test_bin_with_deps", 30 outs = ["out.txt"], 31 cmd = "$(location :bin_with_deps) > $@", 32 tools = [":bin_with_deps"], 33) 34