From 56993cabeb837669623705b265d8057eb6f703f9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 3 May 2018 20:23:45 +0200 Subject: [PATCH] shell/sk/bin/sk-pass: check for dependencies --- shell/sk/bin/sk-pass | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/shell/sk/bin/sk-pass b/shell/sk/bin/sk-pass index 5e42b17c..b8fc5a9a 100755 --- a/shell/sk/bin/sk-pass +++ b/shell/sk/bin/sk-pass @@ -10,6 +10,13 @@ set -e shopt -s nullglob globstar +for prog in xsel notify-send pass; do + if ! command -v "$prog" >/dev/null; then + >&2 echo "$prog not installed, aborting" + exit 1 + fi +done + if [[ $1 == -r ]]; then resume=1; shift fi