-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·91 lines (70 loc) · 2.65 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
#!/bin/bash
rm ~/.vimrc
ln -s ~/dotfiles/vim/.vimrc ~/.vimrc
touch ~/.bashrc
echo 'source ~/dotfiles/.bashrc' >> ~/.bashrc
touch ~/.bash_profile
echo 'source ~/dotfiles/.bash_profile' >> ~/.bash_profile
source ~/.bash_profile 2> /dev/null
sudo add-apt-repository ppa:neovim-ppa/stable
sudo apt install -y build-essential curl git unzip neovim tmux python-is-python3 libncurses5-dev python3-dev
curl https://sh.rustup.rs -sSf -o /tmp/rustup.rs
sh /tmp/rustup.rs -y
curl -fsSL https://deno.land/install.sh | sh
curl https://get.volta.sh | bash
# ----- go -----
curl -L https://go.dev/dl/$(curl https://go.dev/VERSION?m=text).linux-amd64.tar.gz -o go.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go.tar.gz
rm -rf go.tar.gz
go install golang.org/x/tools/cmd/goimports@latest
go install github.com/x-motemen/ghq@latest
# --------------
# -----build vim-----
sudo apt remove vim
sudo apt autoremove vim
ghq get https://github.com/vim/vim
cd ~/ghq/github.com/vim/vim/src
~/dotfiles/build_vim.sh && make && sudo make install && cd -
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
# -------------------
# ----- git settings -----
git config --global user.name "Maru32768"
git config --global core.editor 'vim -c "set fenc=utf-8"'
git config --global color.diff auto
git config --global color.status auto
git config --global color.branch auto
git config --global color.ui true
git config --global push.default simple
git config --global core.ignorecase false
git config --global core.quotepath false
git config --global core.autocrlf input
git config --global merge.tool vimdiff
git config --global merge.conflictstyle diff3
git config --global mergetool.prompt false
# ------------------------
if grep -qi microsoft /proc/version; then
sudo apt install wslu
WINHOME="$(wslpath "$(wslvar USERPROFILE)")"
mv $WINHOME/.ssh $WINHOME/.ssh_bak$(date +%s)
mkdir $WINHOME/.ssh
cp -r ~/.ssh/* $WINHOME
rm -r ~/.ssh
ln -s $WINHOME/.ssh ~/.ssh
mkdir -p $WINHOME/.config/git
mv $WINHOME/.config/git $WINHOME/.config/git_bak$(date +%s)
cp -r ~/.config/git $WINHOME/.config/git
rm -r ~/.config/git
ln -s $WINHOME/.config/git ~/.config/git
mv $WINHOME/.gitconfig $WINHOME/.gitconfig_bak$(date +%s)
cp ~/.gitconfig $WINHOME/.gitconfig
rm ~/.gitconfig
ln -s $WINHOME/.gitconfig ~/.gitconfig
sudo touch /etc/wsl.conf
echo "[automount]" | sudo tee -a /etc/wsl.conf
echo "options = "metadata"" | sudo tee -a /etc/wsl.conf
echo "[boot]" | sudo tee -a /etc/wsl.conf
echo "systemd = true" | sudo tee -a /etc/wsl.conf
fi
source ~/.bash_profile