-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·102 lines (85 loc) · 2.45 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#!/bin/bash
#参考 https://github.com/nicknisi/dotfiles/blob/master/install.sh
echo "Installing dotfiles"
echo "Initializing submodule(s)"
git submodule update --init --recursive
case ${OSTYPE} in
darwin*)
echo "Brewing all the things"
source install/brew.sh
echo "Updating OSX settings"
source install/osx.sh
# echo "rm m4 from emacs term"
# mkdir -p ~/.terminfo/65/
# cp /usr/share/terminfo/65/eterm ~/.terminfo/65/eterm-color
;;
linux*)
if [ -e /etc/debian_version ] ||
[ -e /etc/debian_release ]; then
# Check Ubuntu or Debian
if [ -e /etc/lsb-release ]; then
# Ubuntu
distri_name="ubuntu"
source install/apt-get.sh
source install/ubuntu.sh
else
# Debian
distri_name="debian"
fi
elif [ -e /etc/fedora-release ]; then
# Fedra
distri_name="fedora"
elif [ -e /etc/redhat-release ]; then
if [ -e /etc/oracle-release ]; then
# Oracle Linux
distri_name="oracle"
else
# Red Hat Enterprise Linux
# CentOS
distri_name="redhat"
source install/yum.sh
source install/centos.sh
fi
elif [ -e /etc/arch-release ]; then
distri_name="arch"
source install/pacman.sh
elif [ -e /etc/SuSE-release ]; then
# SuSE Linux
distri_name="suse"
elif [ -e /etc/gentoo-release ]; then
# Gentoo Linux
distri_name="gentoo"
else
# Other
echo "unkown distribution"
distri_name="unkown"
fi
;;
esac
# echo "go settings"
# source install/go.sh
echo "npm settings"
source install/npm.sh
# echo "pyenv settings"
# source install/pyenv.sh
# echo "pip settings"
# source install/pip.sh
# echo "sbcl settings"
# source install/sbcl.sh
echo "gem settings"
source install/gem.sh
# echo "stack settings"
# source install/stack.sh
# echo "lein settings"
# source install/lein.sh
# need interactive
# echo "rust"
# source install/cargo.sh
echo "git settings"
source install/git.sh
echo "Configuring zsh as default shell"
if cat /etc/shells | grep $(which zsh) ; then
sudo which zsh >> /etc/shells
chsh -s $(which zsh)
fi
echo "Done."