diff --git a/etc/profile b/etc/profile index 9b43037..c66bf6e 100644 --- a/etc/profile +++ b/etc/profile @@ -1,3 +1,7 @@ +has() { + command -V "$1" > /dev/null +} + source_if() { if [ -e "$1" ]; then source "$1" @@ -17,13 +21,17 @@ path_if() { source_if "${HOME}/.nix-profile/etc/profile.d/nix.sh" +if has brew; then + source_if "$(brew --prefix asdf)/libexec/asdf.sh" +fi + path_if "$HOME/bin" path_if "$HOME/.local/bin" unset -f source_if unset -f path_if -if command -V gnome-keyring-daemon > /dev/null; then +if has gnome-keyring-daemon; then eval "$(gnome-keyring-daemon --start)" export SSH_AUTH_SOCK fi