system/wallpapers/build.sh

22 lines
420 B
Bash
Raw Normal View History

2022-04-14 16:55:53 +03:00
#!/bin/bash
cd -- $(dirname "$0")
echo "Change dir: $PWD"
jpg_file_names=$(exa -1 | grep jpg)
jpg_file_count=$(echo $jpg_images | wc -l)
if [[ $jpg_file_names != "" && $jpg_file_count != "0" ]]; then
echo found: $jpg_file_count images
echo converting to png...
for f in $jpg_file_names
do
echo " $f -> ${f%.jpg}.png"
convert "$f" "${f%.jpg}.png"
done
echo done
else
echo nothing to convert
fi