-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.profile
More file actions
90 lines (73 loc) · 4.63 KB
/
Copy path.profile
File metadata and controls
90 lines (73 loc) · 4.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/usr/bin/env bash
#====================================================
# Profile Configuration
#
# This script only needs to be sourced upon logging into a system.
# Its contents configure the Bash shell environment.
#====================================================
# Set the path to our prefix directory containing our local build, and development, environment as setup by Linuxbrew.
export HOMEBREW_PREFIX="${HOME}/.local"
export HOMEBREW_CELLAR="${HOMEBREW_PREFIX}/Cellar"
export HOMEBREW_REPOSITORY="${HOMEBREW_PREFIX}/Homebrew"
# Add our local binary directories to our PATH. This will allow us to utilize locally installed binaries when available. Furthermore, because we prepend our local binary directory to our PATH our local binaries will be used in favor of globally-installed system binaries.
# Adding `/opt/python/libexec/` to path so that `python` and `pip` point to Python 3, and pip 3, respectively, instead of Python 2.
export PATH="${HOMEBREW_PREFIX}/bin:${HOMEBREW_PREFIX}/sbin:${HOMEBREW_PREFIX}/opt/python/libexec/bin:${PATH}"
# Add our local info page directory to our MANPATH. This will allow the `man` utility to load manual pages from our local manual directory. Furthermore, because we prepend our local manual directory to our MANPATH, our local manual pages will be used in favor of globally installed manual pages.
export MANPATH="${HOMEBREW_PREFIX}/share/man:${MANPATH:-}"
# Add our local info page directory to our INFOPATH. This will allow the `info` utility to load manual pages from our local manual directory. Furthermore, because we prepend our local manual directory to our INFOPATH, our local manual pages will be used in favor of globally installed manual pages.
export INFOPATH="${HOMEBREW_PREFIX}/share/info:${INFOPATH:-}"
# Inform `pkg-config` of additional pkgconfig metadata available from our brew installation.
export PKG_CONFIG_PATH="/var/home/hutson/.local/opt/bash/lib/pkgconfig:/var/home/hutson/.local/opt/bash-completion@2/share/pkgconfig:${PKG_CONFIG_PATH:-}"
# Specify the directory where Go should store its packages, binaries, and source files.
export GOPATH="${HOMEBREW_PREFIX}/share/go"
export PATH="${GOPATH}/bin:${PATH}"
# Set the default console editor.
export EDITOR=nvim
export TERM="${TERM}" # Export what our environment already provides.
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
# If our terminal has color support, and we're in an xterm window, modify our TERM environmental variable to indicate that it's a 256-color terminal.
if [ "${TERM}" == "xterm" ]; then
export TERM=xterm-256color
fi
fi
# If the XDG configuration home directory is not already set within the current environment, then default it to the value below, which matches the XDG specification.
if [ -z "${XDG_CONFIG_HOME:-}" ]; then
export XDG_CONFIG_HOME="${HOME}/.config"
fi
# If the XDG cache home directory is not already set within the current environment, then default it to the value below, which matches the XDG specification.
if [ -z "${XDG_CACHE_HOME:-}" ]; then
export XDG_CACHE_HOME="${HOME}/.cache"
fi
# If the XDG data home directory is not already set within the current environment, then default it to the value below, which matches the XDG specification.
if [ -z "${XDG_DATA_HOME:-}" ]; then
export XDG_DATA_HOME="${HOME}/.data"
fi
# If the XDG state home directory is not already set within the current environment, then default it to the value below, which matches the XDG specification.
if [ -z "${XDG_STATE_HOME:-}" ]; then
export XDG_STATE_HOME="${HOME}/.state"
fi
# Start our GPG agent so that it can begin responding to requests for a private key (SSH or signing requests), but only from the local system.
if [ -z "${SSH_CLIENT}" ] && [ -z "${SSH_TTY}" ] && command -v gpgconf >/dev/null 2>&1; then
SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
export SSH_AUTH_SOCK
gpgconf --launch gpg-agent
else
echo "gpgconf is not available in the current environment, which will prevent SSH operations and crytographic operations from Git"
fi
# Must be at end of file to allow the environment (variables) to be configured.
case $- in
*i*)
bash=$(type -p bash)
if [ -z "${TMUX}" ] && [ -n "${SSH_TTY}" ]; then
exec tmux new-session -A -D -s hutson
# If this is an interactive login session (Such as SSH connection), attempt to launch the version of Bash installed with Homebrew.
elif [ -x "${bash}" ]; then
# Set SHELL so that other tools, such as TMUX, know which shell launched them.
export SHELL="${bash}"
exec "${bash}"
fi
;;
esac