aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncan Overbruck <mail@duncano.de>2019-07-28 14:41:06 +0200
committerDuncan Overbruck <mail@duncano.de>2019-07-28 14:41:06 +0200
commitdde0ae79f70dec759d7334f7a52fbf2b998bb2cf (patch)
tree60d8f09f70f1379d48062df88cfe88c6034dbd94
parentf7a654bdcb664ad9e087e671ad6771fa3bf24c37 (diff)
downloaddotfiles-dde0ae79f70dec759d7334f7a52fbf2b998bb2cf.tar.gz
config/sh: update
-rw-r--r--config/sh/profile49
1 files changed, 30 insertions, 19 deletions
diff --git a/config/sh/profile b/config/sh/profile
index de03a84..f657839 100644
--- a/config/sh/profile
+++ b/config/sh/profile
@@ -1,31 +1,42 @@
-BROWSER=firefox
-EDITOR=vim
-PAGER=less
-VISUAL=vim
+\: ${LANG:=C.UTF-8}
+\export LANG
-GCC_COLORS="locus=34"
+\: ${XDG_CACHE_HOME:=$HOME/cache}
+\: ${XDG_CONFIG_HOME:=$HOME/config}
+\: ${XDG_DATA_HOME:=$HOME/data}
+\: ${XDG_RUNTIME_DIR:=/run/$USER}
+\export XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR
-: ${GOPATH:="$HOME/go"}
-: ${XDG_RUNTIME_DIR:=/run/$USER}
+\: ${BROWSER:=firefox}
+\: ${EDITOR:=vim}
+\: ${PAGER:=less}
+\: ${VISUAL:=vim}
+\export BROWSER EDITOR PAGER PATH VISUAL
+
+\: ${GCC_COLORS:=locus=34}
+\export GCC_COLORS
+
+\: ${GOPATH:="$HOME/go"}
+\export GOPATH
+
+\: ${SSH_AUTH_SOCK:="${XDG_CACHE_HOME:-$HOME/.cache}"/ssh-agent.sock}
+\export SSH_AUTH_SOCK
for x in \
- "/usr/bin" \
- "/usr/local/bin" \
- "/usr/local/lobase/bin" \
- "/usr/local/lobase/sbin" \
+ "$HOME/bin" \
"$HOME/.local/bin" \
"$HOME/.cargo/bin" \
"$HOME/.cabal/bin" \
"$GOPATH/bin" \
- "$HOME/bin"; do
+ "/usr/local/lobase/sbin" \
+ "/usr/local/lobase/bin" \
+ "/usr/local/bin" \
+ "/usr/bin" \
+ ; do
[ -d "$x" ] || continue
- case "$PATH" in
- *"$x"*) ;;
- *) PATH="$x:$PATH" ;;
+ case ":${PATH}:" in
+ *":${x}:"*) ;;
+ *) PATH="${PATH+${PATH}:}${x}" ;;
esac
done
-export BROWSER EDITOR PAGER PATH VISUAL GCC_COLORS XDG_RUNTIME_DIR GOPATH
-
-SSH_AUTH_SOCK="${XDG_CACHE_HOME:-$HOME/.cache}"/ssh-agent.sock
-export SSH_AUTH_SOCK