From: fpunktk Date: Sat, 30 Dec 2017 11:23:01 +0000 (+0100) Subject: use type instead of which X-Git-Url: https://fpunktk.de/gitweb/?p=anondcim.git;a=commitdiff_plain;h=e90dd999c7f3225f82810c681158ffdeb6fee33b use type instead of which --- 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=""