mirror of
https://github.com/siderolabs/omni.git
synced 2026-03-30 13:11:39 +02:00
Now that we have envsubst in the build container, we can simplify our scripts a bit. Also do other cosmetic improvements in the test scripts. Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
23 lines
521 B
Bash
23 lines
521 B
Bash
#!/usr/bin/env bash
|
|
|
|
# Copyright (c) 2026 Sidero Labs, Inc.
|
|
#
|
|
# Use of this software is governed by the Business Source License
|
|
# included in the LICENSE file.
|
|
|
|
# Find the cluster directory containing the given machine.
|
|
# Usage: dir=$(find_machine_dir "$machine_name")
|
|
find_machine_dir() {
|
|
local machine="$1"
|
|
|
|
for d in "${HOME}/.talos/clusters"/*; do
|
|
if [[ -e "${d}/machine-${machine}.monitor" ]]; then
|
|
echo "${d}"
|
|
return
|
|
fi
|
|
done
|
|
|
|
echo "Error: machine '${machine}' not found" >&2
|
|
return 1
|
|
}
|