2024-09-19 04:31:48 +00:00
|
|
|
#!/usr/bin/env -S bash -c 'echo "Not a user script. source(aka .) only"'
|
|
|
|
|
2024-12-03 13:21:37 +00:00
|
|
|
if is_cmd midclt; then
|
2024-09-19 04:31:48 +00:00
|
|
|
export SCALE_POOL="$(midclt call "kubernetes.config" 2>/dev/null | jq -r '.pool')"
|
2024-12-03 13:21:37 +00:00
|
|
|
[ -n "$SCALE_POOL" ] && [ "$SCALE_POOL" != "null" ] || export SCALE_POOL="$(midclt call "pool.query" 2>/dev/null | jq -r '.[0].name')"
|
2024-09-19 04:31:48 +00:00
|
|
|
[ -d "/mnt/$SCALE_POOL" ] || unset SCALE_POOL
|
|
|
|
fi
|
|
|
|
|
2024-12-03 13:21:37 +00:00
|
|
|
[ -n "$SCALE_POOL" ] \
|
|
|
|
&& export SCALE_POOL_ROOT=/mnt/$SCALE_POOL \
|
|
|
|
&& PATH="$SCALE_POOL_ROOT/_apps.data/_scripts/truestuff:$PATH" \
|
|
|
|
&& PATH="$SCALE_POOL_ROOT/data/scripts/truestuff:$PATH" \
|
|
|
|
&& export PATH
|
2024-09-19 04:31:48 +00:00
|
|
|
|