From e90dd999c7f3225f82810c681158ffdeb6fee33b Mon Sep 17 00:00:00 2001 From: fpunktk Date: Sat, 30 Dec 2017 12:23:01 +0100 Subject: [PATCH] use type instead of which --- anondcim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/anondcim b/anondcim index bbaae33..0fbc941 100755 --- a/anondcim +++ b/anondcim @@ -35,8 +35,8 @@ rand() { [ $# -gt 0 ] || die "Usage: $0 [-p image_prefix] [-s destination_size (absolute or percentage)] [-d destination_directory] imagefile(s)" -[ ! -x "$(which convert)" ] && die "ImageMagick (convert, identify) is not installed" -[ ! -x "$(which jhead)" ] && [ ! -x "$(which exiftool)" ] && die "jhead or exiftool has to be installed" +type convert >/dev/null 2>&1 || die "ImageMagick (convert, identify) is not installed" +type jhead 1>/dev/null 2>&1 || type exiftool 1>/dev/null 2>&1 || die "jhead or exiftool has to be installed" # set default values file_prefix="" -- 2.30.2