#!/usr/bin/bash # Upgrade system sudo pacman -Syu # Remove orphans mapfile -t orphans < <(pacman -Qdttq) if (( ${#orphans[@]} )); then sudo pacman -Rns "${orphans[@]}" fi # Update Neovim plugins if [[ -d ~/.config/nvim/pack/ ]]; then find ~/.config/nvim/pack/ -name .git -type d -print -execdir git pull \; fi