-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.sh
executable file
·54 lines (42 loc) · 851 Bytes
/
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
#!/usr/bin/env bash
set -euo pipefail
DOTFILES=$(cd "$(dirname "$0")"; pwd)
readonly DOTFILES
export DOTFILES
pushd "$PWD"
cd
# shell
ln -s -f "$DOTFILES/.inputrc" .
ln -s -f "$DOTFILES/.profile" .
# bash
ln -s -f "$DOTFILES/.bash_profile" .
ln -s -f "$DOTFILES/.bashrc" .
# zsh
ln -s -f "$DOTFILES/.zshrc" .
# ssh
mkdir -p .ssh
mkdir -p .ssh/config.d
ln -s -f "$DOTFILES/.ssh/config" .ssh
# editorconfig
ln -s -f "$DOTFILES/.editorconfig" .
# git
ln -s -f "$DOTFILES/.gitconfig" .
ln -s -f "$DOTFILES/.gitignore" .
ln -s -f "$DOTFILES/.gitmessage" .
# zgen
if [ ! -d "${HOME}/.zgen" ]
then
git clone https://github.com/tarjoilija/zgen.git "${HOME}/.zgen"
fi
# bin
ln -s -f "$DOTFILES/bin" bin
# developer
mkdir -p src
# platform-specific
if [ "$(uname)" == "Darwin" ]
then
"$DOTFILES"/macos.sh
else
"$DOTFILES"/linux.sh
fi
popd