dotfiles/install.sh

31 lines
797 B
Bash
Raw Normal View History

2022-03-05 19:51:07 +00:00
#!/bin/sh
echo "=> Determining OS..."
if [ "$(uname -o)" = "Android" ] || [ "$(lsb_release -si)" = "Fedora" ]; then
set -- "nvim" "scripts" "zsh"
elif [ "$(lsb_release -si)" = "Debian" ] || [ "$(lsb_release -si)" = "Ubuntu" ]; then
set -- "scripts" "zsh"
elif [ "$(lsb_release -si)" = "Artix" ]; then
set -- "alacritty" "mako" "nvim" "scripts" "sway" "swaylock" "swaynag" "waybar" "zsh"
else
echo "OS not supported!"
exit 1
fi
sleep 0.5
echo "=> Installing dotfile packages..."
cd -- "$(dirname -- $0)"
for pkg in "$@"; do
sleep 0.1
echo " -> Stowing $pkg"
[ "$pkg" = "zsh" ] && mkdir -p "$HOME/.config/$pkg" # Symlink only the individual files instead of the entire directory
stow -t "$HOME" --ignore="README.md" "$pkg"
done
sleep 0.5
echo "=> Done!"