-
Notifications
You must be signed in to change notification settings - Fork 0
/
profile
96 lines (77 loc) · 2.73 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
# -*- mode: sh; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-
#
# ~/.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
#echo running the profile
# what's my IP addr
#IPADDR=$(ip -j a|jq -r '.[]|select(.ifname|test("^wl"))|.addr_info[].local')
# Start an ssh agent for the login session
ssh_env="$HOME/.ssh/environment"
start_agent () {
echo "Initialising new SSH agent..."
/bin/rm -rf "${ssh_env}"
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${ssh_env}"
echo succeeded
/bin/chmod 600 "${ssh_env}"
. "${ssh_env}" > /dev/null
/usr/bin/ssh-add;
}
# Source SSH settings, if applicable
if [ -f "${ssh_env}" ]; then
. "${ssh_env}" > /dev/null # sets SSH_AGENT_PID
/bin/ps -p ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || {
start_agent;
}
else
start_agent;
fi
prepend_path()
{
[ -d "$1" ] && PATH="$1:$PATH" && return 0
return 1
}
append_path()
{
[ -d "$1" ] && PATH="$PATH:$1" && return 0
return 1
}
# set PATH so it includes user's private bin if it exists
prepend_path "$HOME/bin"
# altera
ALTERA="$HOME/altera_lite/15.1"
if [ -d "$ALTERA" ]; then
ALTERAOCLSDKROOT="$ALTERA/hld"
QSYS_ROOTDIR="$ALTERA/quartus/sopc_builder/bin"
export ALTERAOCLSDKROOT QSYS_ROOTDIR
append_path "$QSYS_ROOTDIR"
fi
# Rust / Cargo
append_path "$HOME/.cargo/bin"
# include arm tools for cross compiling arm source for embedded devices
append_path "$HOME/arm/tools:$HOME/arm/tools/gcc-arm-none-eabi-4_7-2013q1/bin"
append_path "/opt/WebStorm-135.547/bin"
KIGITHUB=https://github.com/KiCad; export KIGITHUB
PHP_IDE_CONFIG='servername=localhost' ; export PHP_IDE_CONFIG
NODE_PATH=/usr/local/lib/node_modules ; export NODE_PATH
NVM_DIR="/home/brian/.nvm" ; export NVM_DIR
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
DART_SDK="/usr/lib/dart"
if prepend_path "${DART_SDK}/bin" ; then export DART_SDK; fi
LESS="-f -S -X -R -F" && export LESS
LESSOPEN="||$HOME/.lessfilter.sh %s" && export LESSOPEN
#DOCKER_HOST="0.0.0.0:4243" # this depends on DOCKER_OPTS set in /etc/default/docker
#export DOCKER_HOST
export PATH
prepend_path $HOME/.nimble/bin
# TODO: only do these next two lines on OS X
prepend_path /usr/local/opt/gnu-tar/libexec/gnubin
export MANPATH="/usr/local/opt/gnu-tar/libexec/gnuman:$MANPATH"
[[ -r "$HOME/.gvm/scripts/gvm" ]] && source "$HOME/.gvm/scripts/gvm"
[[ -r "$HOME/.cargo/env" ]] && source "$HOME/.cargo/env"