#!/usr/bin/env bash # Expects a file with pacakge names on newlines in $1 # Will skip lines beginning in a # # # Rationale: # I hated how long it took to extract cached AUR packages just to tell me that # it is up to date and skip installation. # This helper loops over arguments and installs only packages not already on the system. # Then the built in package manager can maintain these packages packages=`cat "$1" | grep -v '#'` for package in "$packages" ; do echo "$package" continue needed=`yay -Qi "$package" 2>&1 >/dev/null` [ -n "$needed" ] && yay --sudoloop --nodiffmenu --noeditmenu --nocleanmenu --noupgrademenu -S "$package" done