From 0c1ec84973e6f85616bb5e76ecc31effe3b59c3c Mon Sep 17 00:00:00 2001 From: Giovanni Angoli Date: Fri, 25 Mar 2016 17:48:51 +0100 Subject: [PATCH] ugly base64 version check --- contrib/faces/image2card.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contrib/faces/image2card.sh b/contrib/faces/image2card.sh index 6064bae..0398e87 100755 --- a/contrib/faces/image2card.sh +++ b/contrib/faces/image2card.sh @@ -38,7 +38,11 @@ imagefile="$1" fullname="$2" -imgdata=$(convert "${imagefile}" -resize '40x40!' - | base64 -w 0) +base64switch="" +base64check=$(echo "jj" | base64 -w 0 > /dev/null 2>&1) +[ "$?" -eq "0" ] && base64switch="-w 0" +imgdata=$(convert "${imagefile}" -resize '40x40!' - | base64 $base64switch) + cat <