crayon-syntax-highlighter/util/sample/sh.txt
2019-08-30 19:30:19 +02:00

12 lines
501 B
Bash

#!/bin/bash
for jpg in "$@" ; do
png="${jpg%.jpg}.png"
echo converting "$jpg" ...
if convert "$jpg" jpg.to.png ; then
mv jpg.to.png "$png"
else
echo 'error: failed output saved in "jpg.to.png".' 1>&2
exit 1
fi
done
echo all conversions successful