34 lines
527 B
Bash
34 lines
527 B
Bash
# /etc/zprofile
|
|
|
|
# Function to easily append a directory to PATH
|
|
append_path() {
|
|
if [ -z "$1" ]; then
|
|
return 1
|
|
elif ! [ -d "$1" ]; then
|
|
return 1
|
|
fi
|
|
export PATH="$PATH":"$1"
|
|
}
|
|
|
|
# Appending paths
|
|
append_path '/usr/sbin'
|
|
append_path '/usr/local/bin'
|
|
append_path '/usr/local/sbin'
|
|
|
|
# Source locale.conf
|
|
if [ -f /etc/locale.conf ]; then
|
|
set -a
|
|
. /etc/locale.conf
|
|
set +a
|
|
fi
|
|
|
|
# Unsetting functions
|
|
unset -f append_path
|
|
|
|
# Run /etc/zshrc if in an interactive terminal
|
|
if [[ $- == *i* ]]
|
|
then
|
|
. /etc/zshrc
|
|
fi
|
|
|