1
Fork 0

find bazel executable easier

This commit is contained in:
Motiejus Jakštys 2021-06-10 19:01:20 +03:00 committed by Motiejus Jakštys
parent dba5242be2
commit 57e0e391f3
1 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,8 @@
#!/bin/bash #!/bin/bash
exec bazel aquery \ # in builds.sr.ht, 'bazel' binary is stored in $HOME.
exec env PATH=$PATH:$HOME \
bazel aquery \
--platforms "$1" "$2" 2>/dev/null | \ --platforms "$1" "$2" 2>/dev/null | \
awk "/action 'GoLink/{f=1};/Outputs: / &&f{print;exit}" | \ awk "/action 'GoLink/{f=1};/Outputs: / &&f{print;exit}" | \
awk -F'\\[|\\]' '{print $2}' awk -F'\\[|\\]' '{print $2}'