added dependency checks
This commit is contained in:
parent
7d8c60570c
commit
11ccb1d2f8
2 changed files with 12 additions and 0 deletions
BIN
20231103_01_fakekitten_2_upload_anything_amazon_photos_01.jpeg
Normal file
BIN
20231103_01_fakekitten_2_upload_anything_amazon_photos_01.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 140 KiB |
|
@ -6,6 +6,18 @@ if [ -z "$1" ] || [ -z "$2" ] || [[ $2 != "encode" && $2 != "decode" && $2 != "e
|
|||
exit
|
||||
fi
|
||||
|
||||
# check for prerequisites:
|
||||
if ! [ -x "$(command -v convert)" ]; then
|
||||
echo 'Error: convert (part of the imagemagick suite) is not installed.' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $2 = "encode_enc" ] || [ $(echo $1 | cut -d "_" -f1) = "FakeKittenENC" ]; then
|
||||
if ! [ -x "$(command -v gpg)" ]; then
|
||||
echo 'Error: gpg is not installed, it is needed for encryption/decryption' >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $2 = "encode" ] || [ $2 = "encode_enc" ]; then
|
||||
imagejpg="random.jpg"
|
||||
|
|
Loading…
Reference in a new issue