-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun_once_after_01-init-core.sh
46 lines (39 loc) · 1.5 KB
/
run_once_after_01-init-core.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
#!/bin/bash
source ~/.bash_profile
eval "$(~/${CONDA_PATH:=miniconda3}/bin/conda shell.bash hook)"
echo '==> setup bash'
echo ''
conda init bash
curl -fsSL "https://raw.githubusercontent.com/seebi/dircolors-solarized/master/dircolors.256dark" -o ~/.dircolors
echo '==> install direnv'
echo ''
if ! type -P direnv; then
curl -fsSL https://direnv.net/install.sh | bash
fi
echo '==> setup fish'
echo ''
conda init fish
/usr/bin/env fish -c "curl -sL https://git.io/fisher | source && fisher update"
/usr/bin/env fish -c "abbr -a vi nvim"
/usr/bin/env fish -c "abbr -a vim nvim"
/usr/bin/env fish -c "abbr -a vie nvim -u ~/.config/nvim/essential.nvim"
/usr/bin/env fish -c "abbr -a rm trash-put"
echo '==> create ~/Applications dir'
echo ''
mkdir -p ~/Applications
echo '==> install neovim'
echo ''
if ! type nvim; then
repo="https://github.com/neovim/neovim/releases"
latest_ver=$(curl -Ls "${repo}/latest" -o /dev/null -w %{url_effective} | grep -oP "[^/]*$")
curl -o ~/Applications/nvim.appimage -L "${repo}/download/${latest_ver}/nvim.appimage"
chmod u+x ~/Applications/nvim.appimage
ln -s ~/Applications/nvim.appimage ~/.local/bin/nvim
fi
echo '==> install git-credential-manager'
echo ''
if ! type -P git-credential-manager; then
repo="https://github.com/git-ecosystem/git-credential-manager/releases"
latest_ver=$(curl -Ls "${repo}/latest" -o /dev/null -w %{url_effective} | grep -oP "[^/]*$")
curl -L "${repo}/download/${latest_ver}/gcm-linux_amd64.${latest_ver#v}.tar.gz" | tar -x -z -C ~/.local/bin
fi