@@ -169,39 +169,20 @@ def _launcher_for_windows(ctx, primary_output, main_file):
169169
170170 return _create_windows_exe_launcher (ctx , sh_toolchain , primary_output )
171171
172- def make_sh_executable_rule (extra_attrs = {}, ** kwargs ):
172+ def make_sh_executable_rule (doc , extra_attrs = {}, ** kwargs ):
173173 return rule (
174174 _sh_executable_impl ,
175- doc = """
176- <p>
177- The <code>sh_binary</code> rule is used to declare executable shell scripts.
178- (<code>sh_binary</code> is a misnomer: its outputs aren't necessarily binaries.) This rule ensures
179- that all dependencies are built, and appear in the <code>runfiles</code> area at execution time.
180- We recommend that you name your <code>sh_binary()</code> rules after the name of the script minus
181- the extension (e.g. <code>.sh</code>); the rule name and the file name must be distinct.
182- <code>sh_binary</code> respects shebangs, so any available interpreter may be used (eg.
183- <code>#!/bin/zsh</code>)
184- </p>
185- <h4 id="sh_binary_examples">Example</h4>
186- <p>For a simple shell script with no dependencies and some data files:
187- </p>
188- <pre class="code">
189- sh_binary(
190- name = "foo",
191- srcs = ["foo.sh"],
192- data = glob(["datafiles/*.txt"]),
193- )
194- </pre>
195- """ ,
175+ doc = doc ,
196176 attrs = {
197177 "srcs" : attr .label_list (
198178 allow_files = True ,
199179 doc = """
200- The list of input files .
180+ The file containing the shell script .
201181<p>
202- This attribute should be used to list shell script source files that belong to
203- this library. Scripts can load other scripts using the shell's <code>source</code>
204- or <code>.</code> command.
182+ This attribute must be a singleton list, whose element is the shell script.
183+ This script must be executable, and may be a source file or a generated file.
184+ All other files required at runtime (whether scripts or data) belong in the
185+ <code>data</code> attribute.
205186</p>
206187""" ,
207188 ),
0 commit comments