From eac660293c025232b7e45a392bbdf5b19af72331 Mon Sep 17 00:00:00 2001 From: Mehdi Sadeghi Date: Sun, 29 Aug 2021 19:28:47 +0200 Subject: Reorganize bash startup files and minor fixes. - Move PATH exports to .env - Move aliases to .env - Avoid loading .env twice - Load .bashrc only on login shell and bash only --- .profile | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to '.profile') diff --git a/.profile b/.profile index a63a4b3..1fa0655 100644 --- a/.profile +++ b/.profile @@ -1,3 +1,4 @@ +# .profile export ENV=~/.env export LANG=en_US.UTF-8 export LC_TIME=de_DE.UTF-8 @@ -5,12 +6,6 @@ export EDITOR=vim export TERM=xterm export HISTSIZE=65535 -export PATH=$HOME/.local/bin:$PATH -export PATH=$HOME/.local/bin/`hostname`:$PATH -export PATH=$HOME/.local/bin/`uname -m`:$PATH -export PATH=$HOME/.cargo/bin:$PATH -export GOPATH="$HOME/.local/share/go" -export PATH=$GOPATH/bin:$PATH export MAKEFLAGS=-j`lscpu | grep '^CPU(s):' | awk -F' ' '{ print $2 }'` export CFLAGS="-O2 -pipe -march=native" export CXXFLAGS="${CFLAGS}" @@ -19,4 +14,4 @@ export _JAVA_AWT_WM_NONREPARENTING=1 export GDK_BACKEND=wayland [ -e .config/$(hostname).profile ] && . .config/$(hostname).profile -[ $0 = bash ] || [ $0 = '-bash' ] && [ -f ~/.bashrc ] && . ~/.bashrc +[ -n $BASH_VERSION ] && shopt login_shell 2>&1 > /dev/null && [ -f ~/.bashrc ] && . ~/.bashrc -- cgit v1.2.3