From cff956e2bf293674aac610fe475ad6204db19f4d Mon Sep 17 00:00:00 2001 From: samedamci Date: Wed, 13 May 2020 10:57:56 +0200 Subject: [PATCH] Add 'isinstalled' script --- .local/bin/scripts/isinstalled | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 .local/bin/scripts/isinstalled diff --git a/.local/bin/scripts/isinstalled b/.local/bin/scripts/isinstalled new file mode 100755 index 0000000..4ee4b17 --- /dev/null +++ b/.local/bin/scripts/isinstalled @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check if package is installed (pacman based distros) or return error code. + +pacman -Qq "$1" 1>/dev/null 2>&1 || exit 1