forked from egiljae/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.sh
executable file
·60 lines (43 loc) · 1.17 KB
/
install.sh
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
49
50
51
52
53
54
55
56
57
58
59
60
#!/usr/bin/env bash
#
# bootstrap installs things.
DOTFILES_ROOT="`pwd`"
set -e
echo ''
info () {
printf " [ \033[00;34m..\033[0m ] $1"
}
user () {
printf "\r [ \033[0;33m?\033[0m ] $1 "
}
success () {
printf "\r\033[2K [ \033[00;32mOK\033[0m ] $1\n"
}
fail () {
printf "\r\033[2K [\033[0;31mFAIL\033[0m] $1\n"
echo ''
exit
}
setup_gitconfig () {
if ! [ -f git/.gitconfig ]
then
info 'setup gitconfig'
git_credential='cache'
user ' - What is your github author name?'
read -e git_authorname
user ' - What is your github author email?'
read -e git_authoremail
git_push=simple
mkdir -p git
sed -e "s/AUTHORNAME/$git_authorname/g" -e "s/AUTHOREMAIL/$git_authoremail/g" -e "s/GIT_CREDENTIAL_HELPER/$git_credential/g" -e "s/GIT_PUSH/$git_push/g" templates/gitconfig.template > git/.gitconfig
success 'gitconfig'
fi
}
install_dotfiles () {
info 'installing dotfiles'
stow -vv -R -S -t "$HOME" git bash bin gnupg i3 nvim pip polybar terminfo termite tmux vim x zsh alacritty yamllint wireplumber
}
setup_gitconfig
install_dotfiles
echo ''
echo ' All installed!'