Replace .zprofile with .profile
This commit is contained in:
parent
65400637e5
commit
4184624d40
3 changed files with 25 additions and 14 deletions
|
|
@ -26,12 +26,12 @@
|
||||||
~/.gitattributes: git/gitattributes
|
~/.gitattributes: git/gitattributes
|
||||||
~/.gitignore: git/gitignore
|
~/.gitignore: git/gitignore
|
||||||
~/.my.cnf: mysql/.my.cnf
|
~/.my.cnf: mysql/.my.cnf
|
||||||
|
~/.profile: etc/profile
|
||||||
~/.psqlrc: psql/.psqlrc
|
~/.psqlrc: psql/.psqlrc
|
||||||
~/.task/hooks: task/hooks/
|
~/.task/hooks: task/hooks/
|
||||||
~/.taskrc: task/.taskrc
|
~/.taskrc: task/.taskrc
|
||||||
~/.tmux.conf: tmux/.tmux.conf
|
~/.tmux.conf: tmux/.tmux.conf
|
||||||
~/.vimrc: vim/.vimrc
|
~/.vimrc: vim/.vimrc
|
||||||
~/.vim: vim/
|
~/.vim: vim/
|
||||||
~/.zprofile: zsh/.zprofile
|
|
||||||
~/.zshenv: zsh/.zshenv
|
~/.zshenv: zsh/.zshenv
|
||||||
~/.zshrc: zsh/.zshrc
|
~/.zshrc: zsh/.zshrc
|
||||||
|
|
|
||||||
24
etc/profile
Normal file
24
etc/profile
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
source_if() {
|
||||||
|
if [ -e "$1" ]; then
|
||||||
|
source "$1"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
path_if() {
|
||||||
|
if [ -d "$1" ]; then
|
||||||
|
case ":$PATH:" in
|
||||||
|
*:"$1":*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
PATH="${1}${PATH:+:$PATH}"
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
source_if "${HOME}/.nix-profile/etc/profile.d/nix.sh"
|
||||||
|
|
||||||
|
path_if "$HOME/bin"
|
||||||
|
path_if "$HOME/.local/bin"
|
||||||
|
|
||||||
|
unset -f source_if
|
||||||
|
unset -f path_if
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
#!/usr/bin/env zsh
|
|
||||||
|
|
||||||
if [ -e "${HOME}/.nix-profile/etc/profile.d/nix.sh" ]; then
|
|
||||||
source "${HOME}/.nix-profile/etc/profile.d/nix.sh"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -d "$HOME/bin" ] ; then
|
|
||||||
PATH="$HOME/bin:$PATH"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -d "$HOME/.local/bin" ] ; then
|
|
||||||
PATH="$HOME/.local/bin:$PATH"
|
|
||||||
fi
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue