#!/bin/bash # Detect is a package is installed or in a database pacman -Qqi $1 >/dev/null 2>&1 || \ pacman -Sqi $1 >/dev/null 2>&1 exit $?