-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·102 lines (79 loc) · 2.1 KB
/
install
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
starter() {
local apps=(htop zsh fzf exa jq neovim stow bat rofi xsetroot xclip flameshot xset ripgrep cmake make fd-find alacritty)
local libs=(glib gdk-pixbuf2 pango-devel cairo-gobject-devel gtk3-devel gtk-layer-shell-devel)
local configs=(git htop nvim scripts x11 zsh leftwm eww rofi alacritty)
# Installing all applications and other stuff
dnfInstaller "${apps[@]}"
dnfInstaller "${libs[@]}"
# Installing dev tools, packages and utils
devToolsInstaller
# Simplele and easy
linker "${configs[@]}"
if [ "$SHELL" != "$(which zsh)" ]; then
echo ">> Activating ZSH shell for $USER, for the next login"
chsh -s /usr/bin/zsh "$USER"
fi
exit 1
}
exists() {
command -v "$1" >/dev/null 2>&1
}
dnfInstaller() {
echo ">> Installing packages: ${*}"
sudo dnf install -y "$@"
}
devToolsInstaller() {
ohmyzshInstaller
nvmInstaller
sdkmanInstaller
rustupInstaller
pyenvInstaller
}
linker() {
local array=("$@")
echo ">> Linking config files: ${*}"
cd $HOME/Sources/Own/dotfiles
for config in "${array[@]}"; do
if [ "$config" = "zsh" ]; then
stow --adopt -t "$HOME" "$config"
else
stow -t "$HOME" "$config"
fi
done
}
ohmyzshInstaller() {
if [ -d "${HOME}/.oh-my-zsh" ]; then
echo "Info: oh-my-zsh already installed."
fi
git clone https://github.com/ohmyzsh/ohmyzsh.git ~/.oh-my-zsh
}
nvmInstaller() {
if [ -d "${HOME}/.nvm/.git" ];then
echo "Info: nvm already installed."
return 1
fi
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
}
pyenvInstaller() {
if [ -d "${HOME}/.pyenv" ];then
echo "Info: pyenv already installed."
return 1
fi
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
}
sdkmanInstaller() {
if [ -d "${HOME}/.sdkman" ]; then
echo "Info: sdkman already installed."
return 1
fi
curl -s "https://get.sdkman.io" | zsh
}
rustupInstaller() {
if [ -d "${HOME}/.rustup" ]; then
echo "Info: rustup already installed."
return 1
fi
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
}
starter