diff options
Diffstat (limited to 'bootstrap')
-rw-r--r-- | bootstrap/bash_logout | 6 | ||||
-rw-r--r-- | bootstrap/bash_profile | 4 | ||||
-rw-r--r-- | bootstrap/bashrc | 41 | ||||
-rw-r--r-- | bootstrap/profile | 17 |
4 files changed, 0 insertions, 68 deletions
diff --git a/bootstrap/bash_logout b/bootstrap/bash_logout deleted file mode 100644 index d6c9b7a..0000000 --- a/bootstrap/bash_logout +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | # bash_logout | ||
2 | # vim:ft=sh | ||
3 | |||
4 | if [[ -r "$XDG_CONFIG_HOME"/bash/logout ]]; then | ||
5 | source "$XDG_CONFIG_HOME"/bash/logout | ||
6 | fi | ||
diff --git a/bootstrap/bash_profile b/bootstrap/bash_profile deleted file mode 100644 index 4439ca7..0000000 --- a/bootstrap/bash_profile +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | # bash_profile | ||
2 | |||
3 | [[ -f ~/.profile ]] && source ~/.profile | ||
4 | [[ -f ~/.bashrc ]] && source ~/.bashrc | ||
diff --git a/bootstrap/bashrc b/bootstrap/bashrc deleted file mode 100644 index 4966e75..0000000 --- a/bootstrap/bashrc +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | # bashrc | ||
2 | |||
3 | # If not running interactively, don't do anything | ||
4 | [[ $- != *i* ]] && return | ||
5 | |||
6 | BASH_SOURCE_FIRST=( | ||
7 | aliases | ||
8 | functions | ||
9 | ) | ||
10 | |||
11 | BASH_SOURCE_LAST=( | ||
12 | blesh | ||
13 | ) | ||
14 | |||
15 | for f in "${BASH_SOURCE_FIRST[@]}"; do | ||
16 | file="${XDG_CONFIG_HOME:-$HOME/.config}/bash/$f.bash" | ||
17 | [[ -r "$file" ]] && source "$file" # || echo >&2 "no '$file' found" | ||
18 | done | ||
19 | |||
20 | for file in "$XDG_CONFIG_HOME"/bash/*.bash; do | ||
21 | file_base="${file##*/}" | ||
22 | memq "${file_base%.bash}" "${BASH_SOURCE_FIRST[@]}" && { | ||
23 | # echo >&2 "'$file' in BASH_SOURCE_FIRST, skipping" | ||
24 | continue | ||
25 | } | ||
26 | memq "${file_base%.bash}" "${BASH_SOURCE_LAST[@]}" && { | ||
27 | # echo >&2 "'$file' in BASH_SOURCE_LAST, skipping" | ||
28 | continue | ||
29 | } | ||
30 | [[ -r "$file" ]] && { | ||
31 | # echo >&2 "Sourcing '$file'" | ||
32 | source "$file" | ||
33 | } | ||
34 | unset file_base | ||
35 | done | ||
36 | |||
37 | for f in "${BASH_SOURCE_LAST[@]}"; do | ||
38 | file="${XDG_CONFIG_HOME:-$HOME/.config}/bash/$f.bash" | ||
39 | [[ -r "$file" ]] && source "$file" # || echo >&2 "no '$file' found" | ||
40 | true | ||
41 | done | ||
diff --git a/bootstrap/profile b/bootstrap/profile deleted file mode 100644 index 4cb459d..0000000 --- a/bootstrap/profile +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | # profile | ||
2 | # vim:ft=sh | ||
3 | |||
4 | # XDG directories | ||
5 | export XDG_CONFIG_HOME="$HOME/etc" | ||
6 | export XDG_CACHE_HOME="$HOME/var/cache" | ||
7 | export XDG_DATA_HOME="$HOME/usr/share" | ||
8 | |||
9 | export XDG_DATA_DIRS="${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" | ||
10 | export XDG_CONFIG_DIRS="${XDG_CONFIG_DIRS:-/etc/xdg}" | ||
11 | |||
12 | # source files in $XDG_CONFIG_HOME/profile | ||
13 | if [ -d "$XDG_CONFIG_HOME/profile" ]; then | ||
14 | for file in "$XDG_CONFIG_HOME"/profile/*.sh; do | ||
15 | [ -r "$file" ] && . "$file" | ||
16 | done | ||
17 | fi | ||