shell/sk/bin/sk-pass: check for dependencies

This commit is contained in:
Henrik Lissner 2018-05-03 20:23:45 +02:00
parent 6c1c75fe08
commit 56993cabeb
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -10,6 +10,13 @@
set -e set -e
shopt -s nullglob globstar 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 if [[ $1 == -r ]]; then
resume=1; shift resume=1; shift
fi fi