-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbd-setup
More file actions
executable file
·50 lines (40 loc) · 1.24 KB
/
bd-setup
File metadata and controls
executable file
·50 lines (40 loc) · 1.24 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
#!/bin/sh
set -e
. ./dist.conf
if [ -z "$1" ]; then
echo "Please provide the module name!"
exit 1
fi
if [ -f "modules/$1/${DISTRIBUTION}_alsoinstall" ]; then
echo "========================================="
echo " do not forget to install this as well:"
for also in $(cat "modules/$1/${DISTRIBUTION}_alsoinstall"); do
echo "* $also"
done
echo "========================================="
fi
if [ -f "modules/$1/mise_packages" ]; then
pkgs=$(cat "modules/$1/mise_packages" | tr '\n' ' ')
if ! command -v mise > /dev/null 2>&1; then
echo "Mise packages, but mise not found! Install misc-dev."
exit 1
fi
for pkg in $pkgs; do
mise install "$pkg"
done
fi
if [ -f "modules/$1/${DISTRIBUTION}_postinstall" ]; then
sh "modules/$1/${DISTRIBUTION}_postinstall"
fi
if [ -f "modules/$1/zsh_plugins" ] && [ -d ~/.oh-my-zsh-plugins ]; then
plugins=$(cat "modules/$1/zsh_plugins" | tr '\n' ' ')
for plugin in $plugins; do
touch "$HOME/.oh-my-zsh-plugins/$plugin"
done
fi
if [ -f "modules/$1/vim_plugins" ] && [ -d ~/.config/nvim/vundle_plugins ]; then
if ! [ -f "$HOME/.config/nvim/vundle_plugins/$1.vim" ]; then
cp "modules/$1/vim_plugins" "$HOME/.config/nvim/vundle_plugins/$1.vim"
nvim +PluginInstall +qall
fi
fi