dotfiles/_home/private_dot_config/sz.env/PATH_truestuff.env

15 lines
584 B
Bash

#!/usr/bin/env -S bash -c 'echo "Not a user script. source(aka .) only"'
if is_cmd midclt; then
export SCALE_POOL="$(midclt call "kubernetes.config" 2>/dev/null | jq -r '.pool')"
[ -n "$SCALE_POOL" ] && [ "$SCALE_POOL" != "null" ] || export SCALE_POOL="$(midclt call "pool.query" 2>/dev/null | jq -r '.[0].name')"
[ -d "/mnt/$SCALE_POOL" ] || unset SCALE_POOL
fi
[ -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