-
Notifications
You must be signed in to change notification settings - Fork 0
/
.common_profile
36 lines (30 loc) · 1.15 KB
/
.common_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
# Common Profile
#
# For items that should only be done at login, will be inherited by all
# subshells, and are common across all shell types (bash, zsh, etc.).
#
# This should be sourced by .bash_profile, .zprofile, etc.
# Set this to true in the top-level shell files (.common_profile, .commonrc) in
# order to get debug print statements at shell startup time.
SHELL_DEBUG=false
# But, always turn it off in non-interactive shells. Otherwise, printing things
# can break scp and prevent us copying files!! (Are you kidding me??)
[ ! -t 0 ] && SHELL_DEBUG=false
if $SHELL_DEBUG; then
echo "Running .common_profile"
fi
# Provides functions for adding items to PATH.
if [ -f $HOME/.add2path ]; then
source $HOME/.add2path
fi
# A convenient function for swapping files.
function swap() { mv $1 $1._tmp; mv $2 $1; mv $1._tmp $2; }
# My dev directory is always here.
DEVDIR=$HOME/Development
# Location for cached model weights from PyTorch
TORCH_HOME=$HOME/.cache/torch
# Source some files that should only contain system-specific settings that
# should not be shared across machines.
if [ -f $HOME/.local/common_profile ]; then
source $HOME/.local/common_profile
fi