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

15 lines
584 B
Bash
Raw Normal View History

2024-09-19 04:31:48 +00:00
#!/usr/bin/env -S bash -c 'echo "Not a user script. source(aka .) only"'
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')"
[ -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
[ -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