forked from ZachiNachshon/dotfiles-example
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.sh
More file actions
48 lines (40 loc) · 1.38 KB
/
config.sh
File metadata and controls
48 lines (40 loc) · 1.38 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
#!/bin/bash
# Description ENV var specifying dotfiles destination directory
# ==============================================================
export DOTFILES_HOME_DIR=${HOME}/.dotfiles
# Description ENV var specifying codebase root folder
# ====================================================
export CODEBASE=${HOME}/codebase
# Description ENV var dotfiles repository path (+alias)
# ======================================================
export DOTFILES_REPO=${CODEBASE}/dotfiles
alias dotfiles=${DOTFILES_REPO}
# Description ENV var specifying environmental settings e.g. Go, JDK etc..
# =========================================================================
export ENVIRONMENT=${HOME}/environment
reload_dot_files() {
_reload_managed_files_inner
_reload_transient_files
_reload_custom_files_inner
}
_reload_managed_files_inner() {
mkdir -p ${DOTFILES_REPO}/dotfiles/managed
for file in $(find ${DOTFILES_REPO}/dotfiles/managed -name ".*"); do
# echo "${file}"
source ${file}
done
}
_reload_transient_files() {
mkdir -p ${DOTFILES_REPO}/dotfiles/transient
for file in $(find ${DOTFILES_REPO}/dotfiles/transient -name ".*"); do
# echo "${file}"
source ${file}
done
}
_reload_custom_files_inner() {
mkdir -p ${DOTFILES_REPO}/dotfiles/custom
for file in $(find ${DOTFILES_REPO}/dotfiles/custom -name ".*"); do
# echo "${file}"
source ${file}
done
}