-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·32 lines (26 loc) · 880 Bytes
/
install.sh
File metadata and controls
executable file
·32 lines (26 loc) · 880 Bytes
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
#!/usr/bin/env bash
set -e
BASH_CLONE_DIR="$HOME/.bash"
if [ -d $BASH_CLONE_DIR ]; then
echo '====> Updating bash files'
(cd $BASH_CLONE_DIR && git pull)
else
echo '====> Cloning bash files'
git clone https://github.com/ericmeyer/bashrc.git $BASH_CLONE_DIR
fi
VCPROMPT_DIR="$HOME/vcprompt"
if [ -d $VCPROMPT_DIR ]; then
echo '====> vcprompt already installed'
else
echo '====> Installing vcprompt'
git clone https://github.com/ericmeyer/vcprompt "$HOME/vcprompt"
( cd "$HOME/vcprompt" && make && make install PREFIX=$HOME )
fi
SOURCE_LINE='source "$HOME/.bash/source_all"'
if grep -q "$SOURCE_LINE" "$HOME/.bash_profile"; then
echo '====> Bash files already sourced'
else
echo '====> Sourcing bash files'
echo 'source "$HOME/.bash/source_all"' >> .bash_profile
fi
echo '====> Installation complete! Please create a new session to see the changes. ^_^'