[sledge] Fix generation of sledge-help.txt

Summary: Previous changes to the build system broke this.

Reviewed By: jvillard

Differential Revision: D24859021

fbshipit-source-id: afca228b8
master
Josh Berdine 4 years ago committed by Facebook GitHub Bot
parent aacdbc060a
commit 60eed3fbad

@ -132,8 +132,7 @@
(rule
(targets sledge-help.txt)
(deps cli/sledge_cli.ml cli/sledge_buck.ml tools/gen_help.sh
cli/sledge_cli.exe)
(deps tools/gen_help.sh cli/sledge_cli.exe)
(action
(with-stdout-to
sledge-help.txt

@ -5,7 +5,7 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
sledge=$(dirname $PWD)/install/$(basename $PWD)/bin/sledge
sledge=$PWD/cli/sledge_cli.exe
line=$(\
$sledge help -recursive -expand \
@ -14,12 +14,12 @@ line=$(\
line=$(($line+1))
$sledge help -recursive
$sledge help -recursive | sed -e "s/sledge_cli.exe/sledge/g"
$sledge h -r -e \
| tail -n +$line \
| sed -e "/^$/d;s/ \(.*\) .*/\1/g" \
| while read cmd; do \
printf "\n====== sledge $cmd ======\n\n"; \
$sledge $cmd -help; \
$sledge $cmd -help | sed -e "s/sledge_cli.exe/sledge/g"; \
done

Loading…
Cancel
Save