[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 (rule
(targets sledge-help.txt) (targets sledge-help.txt)
(deps cli/sledge_cli.ml cli/sledge_buck.ml tools/gen_help.sh (deps tools/gen_help.sh cli/sledge_cli.exe)
cli/sledge_cli.exe)
(action (action
(with-stdout-to (with-stdout-to
sledge-help.txt sledge-help.txt

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

Loading…
Cancel
Save