Update 'setup' script

master
Hektor Misplon 2025-02-05 00:31:41 +01:00
parent f858f7374b
commit a83d0fd28f
1 changed files with 29 additions and 30 deletions

View File

@ -1,5 +1,18 @@
#!/bin/bash
# Packages to install from Arch repositories
pac_list=(
git
vim
)
# Packages to install from AUR
aurpac_list=(
ttf-iosevka-term-ss08
vim-plug
xbanish
)
install() {
if pacman -Qi "$1" &> /dev/null; then
echo ""$1" is already installed"
@ -9,20 +22,9 @@ install() {
fi
}
# Packages to install from Arch repositories
pac_list=(
git
vim
)
# Packages to install from AUR
aurpac_list=(
xbanish
ttf-iosevka-term-ss08
)
# Suckless software to build
suckless_list=( $(ls -1 "$HOME/.suckless/") )
aurpac() {
git clone "https://aur.archlinux.org/$1.git" "$HOME/.build/$1"
}
count=0
@ -37,37 +39,34 @@ for pac in "${pac_list[@]}" ; do
install "$pac";
done
origin="https://git.hektormisplon.xyz/hektor/dots"
git clone "$origin" "$HOME/dots"
cp -r "$HOME/dots/.git" "$HOME/.git"
git --git-dir="$HOME/.git" config --local status.showUntrackedFiles no
git --git-dir="$HOME/.git" stash -m "[dots]"
git --git-dir="$HOME/.git" stash apply
git --git-dir="$HOME/.git" restore "$HOME"
echo " "
echo "Installing aur packages"
echo " "
# [ ] Create aurpac installer function
for aurpac in "${aurpac_list[@]}" ; do
for package in "${aurpac_list[@]}" ; do
if pacman -Qi "$1" &> /dev/null; then
echo "$1 is already installed"
else
count=$[count+1]
("$HOME/.bin/aurpac" "$aurpac" && cd "$aurpac" && makepkg -si)
aurpac "$package" && makepkg -si -D "$HOME/.build/$package"
fi
done
echo " "
echo "Setting up suckless tools"
echo "Setting up NeoVim"
echo " "
printf '%s\n' "${suckless_list[@]}"
# for tool in "${suckless_list[@]}" ; do
# count=$[count+1]
# (cd "$HOME/.suckless/$tool/" && sudo make clean install);
# done
# echo " "
# echo "Setting up vim"
# echo " "
# cp .vimrc $HOME/.vimrc
# vim +PlugInstall
git clone --depth=1 https://github.com/savq/paq-nvim.git \
"${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/pack/paqs/start/paq-nvim
## Bluetooth setup
# ___