refactor(tools): __dispatch.sh now uses relative paths
This enables usage of __dispatch.sh from anywhere, even outside of the depot. Specifically this means I can add `~/depot/bin` to my $PATH and all the registered tools work from anywhere.
This commit is contained in:
parent
f69dfbc40e
commit
cbe7b47a96
3 changed files with 4 additions and 3 deletions
1
third_party/default.nix
vendored
1
third_party/default.nix
vendored
|
@ -61,6 +61,7 @@ let
|
|||
rustc
|
||||
sbcl
|
||||
stdenv
|
||||
stern
|
||||
symlinkJoin
|
||||
terraform_0_12
|
||||
tree
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
# to the key in nixpkgs which represents the program you want to run.
|
||||
set -ueo pipefail
|
||||
|
||||
readonly REPO_ROOT=$(git rev-parse --show-toplevel)
|
||||
readonly REPO_ROOT=$(dirname $0)/../..
|
||||
readonly TARGET_TOOL=$(basename $0)
|
||||
|
||||
case "${TARGET_TOOL}" in
|
||||
|
@ -20,9 +20,9 @@ case "${TARGET_TOOL}" in
|
|||
attr="tools.blog_cli"
|
||||
;;
|
||||
stern)
|
||||
attr="stern"
|
||||
attr="third_party.stern"
|
||||
;;
|
||||
pass)
|
||||
kms_pass)
|
||||
attr="tools.kms_pass"
|
||||
;;
|
||||
aoc2019)
|
||||
|
|
Loading…
Reference in a new issue