-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.bash
More file actions
99 lines (84 loc) · 2.4 KB
/
run.bash
File metadata and controls
99 lines (84 loc) · 2.4 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
installs=()
read -n 1 -p "Sway configs? [y/N] " sway
sway=${sway:-n}
read -n 1 -p "Alacritty configs? [y/N] " alacritty
alacritty=${alacritty:-n}
read -n 1 -p "Tmux configs? [Y/n] " tmux
tmux=${tmux:-y}
read -n 1 -p "Vim configs? [Y/n] " v
v=${v:-y}
mkdir ~/.config
if [[ "$v" =~ ^([yY][eE][sS]|[yY])$ ]]
then
echo "installing vim configs..."
curl http://piethon.party/configs/vimrc > ~/.vimrc
else
echo "Skipping vim"
fi
if [[ "$tmux" =~ ^([yY][eE][sS]|[yY])$ ]]
then
echo "installing tmux configs"
curl http://piethon.party/configs/tmux.conf > ~/.tmux.conf
else
echo skipping tmux
fi
if [[ "$alacritty" =~ ^([yY][eE][sS]|[yY])$ ]]
then
echo "installing alacritty styling configs"
mkdir ~/.config/alacritty
curl http://piethon.party/configs/alacritty.conf > ~/.config/alacritty/alacritty.conf
else
echo skipping alacritty
fi
if [[ "$sway" =~ ^([yY][eE][sS]|[yY])$ ]]
then
echo "installing sway configs"
mkdir ~/.config/sway
curl http://piethon.party/configs/sway.conf > ~/.config/sway/config
else
echo skipping sway
fi
if [ command -v apt &> /dev/null ]
then
echo "using apt"
installer=apt
flags=-y
apt update -y
apt upgrade -y
apt install -y vim curl git python3-pip tmux fonts-hack-ttf make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget llvm \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev dos2unix
fi
if [ command -v pacman &> /dev/null ]
then
echo "using pacman"
installer=pacman
flags=-Syu
pacman -Syu vim curl git python pyenv tmux alacritty ttf-hack
fi
for value in "${installs[@]}"
do
$installer $flags $value
done
if [ ! command -v pyenv &> /dev/null ]
then
curl https://pyenv.run | bash
echo export PATH="$HOME/.pyenv/bin:$PATH" >> ~/.bashrc
echo eval "$(pyenv init --path)" >> ~/.bashrc
echo eval "$(pyenv virtualenv-init -)" >> ~/.bashrc
fi
source ~/.bashrc
echo "installing python version for pyenv (making it global)"
# Activate python version
pyenv install 3.10.7
pyenv global 3.10.7
echo installing requirements for ALEFix on python
# Install Requirements for ALEFix
pip3 install flake8
pip3 install autopep8
echo installing Vundle
# Get Vundle & Pyenv
git clone -q https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
cd ~/.vim/bundle/Vundle.vim && git pull
cd
# Install Vim Pluugins
vim +PluginInstall +qall