15 lines
293 B
Bash
Executable file
15 lines
293 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
format=$(echo ${1##*.})
|
|
if [ $format != "jpg" ]
|
|
then
|
|
convert $1 /tmp/logo.jpg
|
|
else
|
|
cp $1 /tmp/logo.jpg
|
|
fi
|
|
jp2a $2 --background=dark --colors /tmp/logo.jpg --output=/tmp/logo.txt
|
|
while IFS= read -r line; do
|
|
echo "echo -e \"$line\""
|
|
done < /tmp/logo.txt
|