tools: fix install.sh for non-Nix systems

Change-Id: Id3aa846255129d90be22bce2aa38d468d78d816c
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1533
Reviewed-by: q3k <q3k@hackerspace.pl>
changes/33/1533/4
palid 2023-07-13 23:20:10 +02:00 committed by palid
parent 7094d69a70
commit b19e8123ad
1 changed files with 3 additions and 3 deletions

View File

@ -29,18 +29,18 @@ function main() {
local path_missing=""
local path="$(hscloud::workspace_location)/bazel-bin/tools"
if [[ ":$PATH:" == *":$path:"* ]]; then
if [[ ":$PATH:" != *":$path:"* ]]; then
path_missing="$path"
fi
local path="$(hscloud::workspace_location)/bazel-bin/cluster/tools"
if [[ ":$PATH:" == *":$path:"* ]]; then
if [[ ":$PATH:" != *":$path:"* ]]; then
if [ -z "$path_missing" ]; then
path_missing="$path"
else
path_missing="$path_missing:$path"
fi
fi
if [ -z "$path_missing" ]; then
if [ ! -z "$path_missing" ]; then
echo "Tools built correctly, but your PATH should be updated to access them:">&2
echo ' PATH="$PATH:'$path_missing'"'
echo 'Add the above line to your shell profile, or source env.sh from the root of hscloud.'