|
@@ -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"
|