-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun
More file actions
executable file
·102 lines (89 loc) · 2.73 KB
/
run
File metadata and controls
executable file
·102 lines (89 loc) · 2.73 KB
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
install() {
if [ $2 = "deps" ]
then
shared_deps="\
wget tar make gdb lcov pkg-config libbz2-dev gcc build-essential \
libffi-dev libgdbm-dev libgdbm-compat-dev liblzma-dev iw \
libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev docker \
lzma lzma-dev tk-dev uuid-dev zlib1g-dev stow tmux curl ripgrep \
python3-pip python3-venv python-is-python3"
if [ -x "$(command -v pacman)" ]
then
sudo pacman -Sy neovim fd git-delta $shared_deps
elif [ -x "$(command -v apt-get)" ]
then
pushd $HOME
[ ! -d ./Applications ] && mkdir Applications
nvim=$HOME/Applications/nvim
if [ ! -f $nvim ]
then
cd Applications
wget https://github.com/neovim/neovim/releases/download/v0.9.1/nvim.appimage -O nvim
chmod +x $nvim
fi
popd
sudo apt-get install tmux fd-find python3-pip $shared_deps
fi
python3 -m pip install pynvim
git submodule update
if [[ -z $(command -v pyenv) ]]
then
curl -s -S -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash
pyenv install 3.11
pyenv global 3.11
fi
if [[ -z $(command -v nvm) ]]
then
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
nvm install node
fi
if [[ -z $(command -v go) ]]
then
go="go1.20.1.linux-amd64.tar.gz"
wget https://go.dev/dl/$go
rm -rf /usr/local/go && sudo tar -C /usr/local -xzf $go && rm $go
fi
if [[ -z $(command -v cargo) ]]
then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
cargo install git-delta
fi
[[ ! -d $HOME/Programs ]] && mkdir $HOME/Programs
pushd $HOME/Programs
if [[ ! -d $HOME/Programs/fzf ]]
then
git clone https://github.com/junegunn/fzf.git
cd fzf
chmode +x ./install
./install
fi
popd
fi
pushd ~/
[ -f .bashrc ] && mv .bashrc .bashrc.old
[ -f .profile ] && mv .profile .profile.old
cd .dotfiles
for folder in $(ls -d */ | sed "s/,/ /g")
do
stow $folder
done
popd
}
remove() {
pushd ~/.dotfiles
for folder in $(ls -d */ | sed "s/,/ /g")
do
stow -D $folder
done
popd
}
reinstall() {
remove
install
}
case $1 in
"install") install $@ ;;
"remove") remove $@ ;;
"reinstall") reinstall $@ ;;
esac