Compare commits
2 Commits
f3bd0e804d
...
ffc9fc2d95
Author | SHA1 | Date |
---|---|---|
Lockszmith (kateryna) | ffc9fc2d95 | |
Lockszmith (kateryna) | 18f047b9ca |
|
@ -16,9 +16,9 @@
|
||||||
[ -z "${DBG_SHRC}" ] || echo "Exiting .bashrc"
|
[ -z "${DBG_SHRC}" ] || echo "Exiting .bashrc"
|
||||||
# This will prevent atuin's setup script from adding itself: atuin init bash
|
# This will prevent atuin's setup script from adding itself: atuin init bash
|
||||||
|
|
||||||
eval "${SZ_ENV_BASH_LOAD_PREEXEC}"
|
#eval "${SZ_ENV_BASH_LOAD_PREEXEC}"
|
||||||
if [[ -n "${BLE_VERSION-}" ]]; then
|
#if [[ -n "${BLE_VERSION-}" ]]; then
|
||||||
[[ -n "${DBG}" ]] && echo "attaching ble.sh"
|
# [[ -n "${DBG}" ]] && echo "attaching ble.sh"
|
||||||
ble-attach
|
# ble-attach
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/usr/bin/env -S bash -c 'echo "Not a user script. source(aka .) only"'
|
||||||
|
|
||||||
|
function is_truenas() {
|
||||||
|
local TRUENAS_TARGET="truenas.target"
|
||||||
|
[ "$(systemctl get-default)" = "$TRUENAS_TARGET" ] \
|
||||||
|
&& [ "$(systemctl is-active "$TRUENAS_TARGET")" = "active" ]
|
||||||
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env -S bash -c 'echo "Not a user script. source(aka .) only"'
|
#!/usr/bin/env -S bash -c 'echo "Not a user script. source(aka .) only"'
|
||||||
|
|
||||||
if is_cmd midclt; then
|
if is_truenas && is_cmd midclt && [ -z "$SCALE_POOL" ]; then
|
||||||
export SCALE_POOL="$(midclt call "kubernetes.config" 2>/dev/null | jq -r '.pool')"
|
export SCALE_POOL="$(midclt call "kubernetes.config" 2>/dev/null | jq -r '.pool')"
|
||||||
[ -d "/mnt/$SCALE_POOL" ] || unset SCALE_POOL
|
[ -d "/mnt/$SCALE_POOL" ] || unset SCALE_POOL
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -48,11 +48,14 @@ if is_sourced; then
|
||||||
# The following constructs a list of load_next ... commands
|
# The following constructs a list of load_next ... commands
|
||||||
ALL_ENV_FILES="$(
|
ALL_ENV_FILES="$(
|
||||||
find ~/.config/sz.env -xdev -type d -not -name '*.off' \
|
find ~/.config/sz.env -xdev -type d -not -name '*.off' \
|
||||||
|
-exec sh -c '
|
||||||
|
find "$1" -xdev -maxdepth 1 -type f -name "ID_*.env" | sort
|
||||||
|
' shell '{}' ';' \
|
||||||
-exec sh -c '
|
-exec sh -c '
|
||||||
find "$1" -xdev -maxdepth 1 -type f -name "PATH_*.env" | sort
|
find "$1" -xdev -maxdepth 1 -type f -name "PATH_*.env" | sort
|
||||||
' shell '{}' ';' \
|
' shell '{}' ';' \
|
||||||
-exec sh -c '
|
-exec sh -c '
|
||||||
find "$1" -xdev -maxdepth 1 -type f -name "*.env" -not -name "PATH_*" -print | sort
|
find "$1" -xdev -maxdepth 1 -type f -name "*.env" -not -name "ID_*" -not -name "PATH_*" -print | sort
|
||||||
' shell '{}' ';' \
|
' shell '{}' ';' \
|
||||||
| sed -e 's/^/load_next "/; s/$/";/'
|
| sed -e 's/^/load_next "/; s/$/";/'
|
||||||
)"
|
)"
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
#!/usr/bin/env -S bash -c 'echo "Not a user script. source(aka .) only"'
|
||||||
|
|
||||||
|
BASE_SHELL=${BASE_SHELL:-${SHELL##*/}}
|
||||||
|
|
||||||
|
if [[ "${BASE_SHELL}" == "bash" ]]; then
|
||||||
|
eval "${SZ_ENV_BASH_LOAD_PREEXEC}"
|
||||||
|
if [[ -n "${BLE_VERSION-}" ]]; then
|
||||||
|
[[ -n "${DBG}" ]] && echo "attaching ble.sh"
|
||||||
|
ble-attach
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
|
@ -22,9 +22,10 @@ if is_sourced; then
|
||||||
}
|
}
|
||||||
zellij() {
|
zellij() {
|
||||||
if [[ ! -x ~/bin/zellij ]]; then
|
if [[ ! -x ~/bin/zellij ]]; then
|
||||||
if [[ -r $HOME/.cache/chezmoi/tmp/zellij/zellij ]]; then
|
if [[ -x $HOME/.cache/chezmoi/tmp/zellij/zellij ]]; then
|
||||||
ln --symbolic --relative $HOME/.cache/chezmoi/tmp/zellij/zellij ~/bin
|
ln --symbolic --relative $HOME/.cache/chezmoi/tmp/zellij/zellij ~/bin
|
||||||
elif [[ ! -x /tmp/zellij/bootstrap/zellij ]]; then
|
elif [[ ! -x /tmp/zellij/bootstrap/zellij ]]; then
|
||||||
|
printf "Grabbing zellij from the web!\n"
|
||||||
bash <(curl -sL zellij.dev/launch) "${@}" && return
|
bash <(curl -sL zellij.dev/launch) "${@}" && return
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue