-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc
41 lines (31 loc) · 933 Bytes
/
.bashrc
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
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, do nothing
[ -z "$PS1" ] && return
# source specified file, only when it really exist.
Source ()
{
local item
for item in "$@" ; do
if [ -f "${item}" ] ; then
source "${item}"
else
:
#echo "[error] file '${item}' does not exist."
fi
done
}
export PRIVATE_BASH_DIR=$HOME/.bash.d
Source "$PRIVATE_BASH_DIR/alias.sh"
Source "$PRIVATE_BASH_DIR/function.sh"
Source "$PRIVATE_BASH_DIR/common.sh"
if [[ $(uname) =~ 'Linux' ]] ; then
distro=$(distro-detect)
if [[ ${distro} != "unknown" ]] ; then
Source "${PRIVATE_BASH_DIR}/${distro}.sh"
fi
elif [[ $(uname) =~ 'Cygwin' ]] ; then
Source "$PRIVATE_BASH_DIR/cygwin.sh"
fi
Source "$PRIVATE_BASH_DIR/test.sh"