forked from sfc-gh-eraigosa/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.profile
103 lines (87 loc) · 3.39 KB
/
.profile
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
91
92
93
94
95
96
97
98
99
100
101
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
if [ -f /etc/environment ] ; then
. /etc/environment
fi
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
if [ -d "$HOME/opt/bin" ] ; then
PATH="$HOME/opt/bin:$PATH"
fi
# cabal
if [ -d "$HOME/.cabal/bin" ] ; then
PATH="$HOME/.cabal/bin:$PATH"
fi
export PUPPET_MODULES=$PUPPET_MODULES:~/.puppet/modules
export PUPPET_MODULES=/opt/config/production/puppet/modules:~/git/CDK-infra/blueprints/openstack/puppet/modules:/opt/config/production/git/config/modules:/etc/puppet/modules:/home/wenlock/.puppet/modules
force_color_prompt=yes
# Info file
id=$(hostname | awk -F. '{print $2}')
if [ `command -v facter` ]; then
ip=$(facter ipaddress)
fi
echo "|$id|$ip" > ~/.info
# SSH BANNER -------------------------
rm ~/.motd
owner="wenlock"
owner=$(printf '%-40s' $owner)
host=$(hostname | awk -F. '{print $1"."$2}')
host=$(printf '%10s' $host)
echo -e "\033[1;37m┌─────────────────────────────────────────────────────────────┐" > ~/.motd
echo -e "\033[1;37m│ \033[01;31m$host \033[01;32mOWNED BY $owner\033[1;37m│" >> ~/.motd
echo -e "\033[1;37m└─────────────────────────────────────────────────────────────┘\033[00m" >> ~/.motd
cat ~/.motd
if [ -f $HOME/.custom_profile ] ; then
. $HOME/.custom_profile
fi
# powerline setup
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi
if [ ! -d "$HOME/.fonts/" ] ; then
mkdir -p "$HOME/.fonts/"
fi
if [ ! -d "$HOME/.config/fontconfig/conf.d/" ] ; then
mkdir -p "$HOME/.config/fontconfig/conf.d/"
fi
if [ -f "$HOME/git/powerline/font/PowerlineSymbols.otf" ] ; then
cp "$HOME/git/powerline/font/PowerlineSymbols.otf" "$HOME/.fonts/"
fi
if [ -f "$HOME/.config/fontconfig/conf.d/10-powerline-symbols.conf" ] ; then
cp "$HOME/git/powerline/font/10-powerline-symbols.conf" "$HOME/.config/fontconfig/conf.d/10-powerline-symbols.conf"
fi
if [ ! -d $HOME/go ] ; then
mkdir $HOME/go
fi
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
export PATH="$PATH:/usr/local/bin/docker"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
# Source git environment shortcuts
. $HOME/.dindcenv
#
# ruby docker environment aliases
#
if [ -f /Users/eraigosa/.ruby.env ] ; then
source /Users/eraigosa/.ruby.env
else
echo ".ruby.env is missing, you can install with : . opt/bin/setup_ruby-docker.sh"
fi
#
# iterm integration with brew install https://gist.github.com/ZenLulz/c812f70fc86ebdbb189d9fb82f98197e
# brew cask install iterm2
#test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash"