-
Notifications
You must be signed in to change notification settings - Fork 0
/
firstinit.sh
executable file
·33 lines (28 loc) · 1.33 KB
/
firstinit.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
#! /bin/bash
source ~/scripts/aliases-and-functions
# for linksave() and append_ifnot_line()
linksave ~/configs/_emacs.el ~/.emacs
linksave ~/configs/_inputrc ~/.inputrc
if [ $(uname -o) = GNU/Linux ]; then
mkdir -p ~/.xneur/
linksave ~/configs/xneurrc ~/.xneur/xneurrc
fi
if [ -n "$BASH_VERSION" ]; then
[ -f ~/.bashrc ] && append_ifnot_line 'source ~/configs/shellrc' ~/.bashrc || ln ~/configs/shellrc ~/.bashrc
elif [ -n "$ZSH_VERSION" ]; then
[ -f ~/.zshrc ] && append_ifnot_line 'source ~/configs/shellrc' ~/.zshrc || ln ~/configs/shellrc ~/.zshrc
else
[ -f ~/.bashrc ] && append_ifnot_line 'source ~/configs/shellrc' ~/.bashrc || echo '~/.bashrc is epsent'
[ -f ~/.zshrc ] && append_ifnot_line 'source ~/configs/shellrc' ~/.zshrc || echo '~/.zshrc is epsent'
fi
if [ -n "$(git --version)" ]; then
git config --global user.name FeelUs
git config --global user.email '[email protected]'
# git config --global что-то там еще ...
git config --global core.quotepath false # по чловечески выводить unicode а не <число><число><число>
git config --global credential.helper 'cache --timeout 30000' # помнить пароль 8 часа
git config --global alias.ch checkout
git config --global alias.co commit
git config --global alias.st status
git config --global alias.br branch
fi