From e6c35b7b14ba815b82a7377f16b06801d68700ce Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Fri, 29 Jul 2022 17:04:24 -0500 Subject: bleh --- profile/00_functions.sh | 5 +++++ profile/go.sh | 4 ++-- profile/infopath.sh | 4 ++-- profile/luarocks.sh | 2 +- profile/manpath.sh | 11 ++++++----- profile/ssh-agent.sh | 10 +++++----- 6 files changed, 21 insertions(+), 15 deletions(-) (limited to 'profile') diff --git a/profile/00_functions.sh b/profile/00_functions.sh index 3c67ddf..4bf0c78 100644 --- a/profile/00_functions.sh +++ b/profile/00_functions.sh @@ -62,3 +62,8 @@ path_add_unsafe() { #path_add_unsafe [-a] [-d DELIM] VAR PATH... done unset -v APPEND DELIM var } + +# Re-source ~/.profile +reprofile() { + . $HOME/.profile +} diff --git a/profile/go.sh b/profile/go.sh index 8b4ca26..205c881 100644 --- a/profile/go.sh +++ b/profile/go.sh @@ -1,9 +1,9 @@ -export GOPATH="${XDG_DATA_HOME:=$HOME/.local/share}/go" +export GOPATH="$HOME/src/go" # https://drewdevault.com/2022/05/25/Google-has-been-DDoSing-sourcehut.html export GOPROXY=direct # For the GO binary ... XXX: this is slightly clunky (~/usr/local/go/bin is the directory) -path_add_to_PATH $(realpath "$XDG_DATA_HOME/../local/go/bin") +path_add_to_PATH "$GOPATH/go/bin" command -v go >/dev/null 2>&1 && path_add_to_PATH "$(go env GOPATH)/bin" diff --git a/profile/infopath.sh b/profile/infopath.sh index 80080b8..92ecd72 100644 --- a/profile/infopath.sh +++ b/profile/infopath.sh @@ -1,7 +1,7 @@ # See 00_functions.sh for `path_add_unsafe'. path_add_unsafe INFOPATH \ - /usr/share/info \ - "${XDG_DATA_HOME:-$HOME/.local/share}/info" + /usr/share/info \ + "${XDG_DATA_HOME:-$HOME/.local/share}/info" export INFOPATH diff --git a/profile/luarocks.sh b/profile/luarocks.sh index 547a94d..e6e1d24 100644 --- a/profile/luarocks.sh +++ b/profile/luarocks.sh @@ -1,5 +1,5 @@ # add luarocks stuff to $PATH if command -v luarocks >/dev/null 2>&1; then - eval "$(luarocks path --bin)" + eval "$(luarocks path)" fi diff --git a/profile/manpath.sh b/profile/manpath.sh index 944059c..9f310e8 100644 --- a/profile/manpath.sh +++ b/profile/manpath.sh @@ -1,15 +1,16 @@ # See 00_functions.sh for `path_add_unsafe'. path_add_unsafe MANPATH \ - "${XDG_DATA_HOME:-$HOME/.local/share}/man" \ - "$HOME/.local/local/man" \ - "$HOME/usr/local/man" + "${XDG_DATA_HOME:-$HOME/.local/share}/man" \ + "$HOME/.local/local/man" \ + "$HOME/usr/local/man" \ + "$HOME/usr/man" # $MANPATH ends with `:' so that manpath(1) will prepend it to its # special thing. case "$MANPATH" in - *:) ;; - *) MANPATH="$MANPATH:" ;; +*:) ;; +*) MANPATH="$MANPATH:" ;; esac export MANPATH diff --git a/profile/ssh-agent.sh b/profile/ssh-agent.sh index 7afb7c6..95669d5 100644 --- a/profile/ssh-agent.sh +++ b/profile/ssh-agent.sh @@ -1,10 +1,10 @@ # start the ssh-agent # use keychain(1), if available -if type keychain > /dev/null 2>&1; then - # Save directory name in a variable (for ease of maintenance) - export KEYCHAIN_HOME="$XDG_RUNTIME_DIR/keychain" - eval $(keychain --eval --dir "$KEYCHAIN_HOME" --agents ssh 2>/dev/null) +if type keychain >/dev/null 2>&1; then + # Save directory name in a variable (for ease of maintenance) + export KEYCHAIN_HOME="$XDG_RUNTIME_DIR/keychain" + eval $(keychain --eval --dir "$KEYCHAIN_HOME" --agents ssh 2>/dev/null) else - eval $(ssh-agent -s) + eval $(ssh-agent -s) fi -- cgit 1.4.1-21-gabe81