From 83574c6f204e7f4cf2844fd137f6eb812840c1c8 Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani Date: Tue, 19 Jan 2021 18:45:24 -0500 Subject: [PATCH] Ignore the pregenerated logo when running svg2img --- README.md | 2 +- logo-square-color-dark-256.png => logo.png | Bin svg2img | 5 +++-- 3 files changed, 4 insertions(+), 3 deletions(-) rename logo-square-color-dark-256.png => logo.png (100%) diff --git a/README.md b/README.md index bae6492..f8c6816 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # personal logo A logo/icon/pfp I designed for myself -![Logo](logo-square-color-dark-256.png) +![Logo](logo.png) ## Generation Running `svg2img ` will generate all the variants of the logo in the formats of your choice. The logo goes from the template to SVG to PNG to whatever format you choose. It supports any format that ImageMagick supports, as well as ASCII and Unicode. diff --git a/logo-square-color-dark-256.png b/logo.png similarity index 100% rename from logo-square-color-dark-256.png rename to logo.png diff --git a/svg2img b/svg2img index 44af51c..2dcf70e 100755 --- a/svg2img +++ b/svg2img @@ -56,7 +56,8 @@ for arg in ${@};do [[ ${arg} == "svg" ]] && exit 0 - [[ ${arg} == "png" ]] && find . -name *.png -exec rm -v {} \; + [[ ${arg} == "png" ]] && find . -name *.png -not -iwholename ./logo.png \ + -exec rm -v {} \; if [[ (! -d "square/png" || ! -d "circle/png") || (${arg} == "png") ]]; then echo "Generating PNGs" @@ -137,6 +138,6 @@ for arg in ${@};do while read PAT; do echo "Generating ${arg}s" convert -verbose ${PAT} ${PAT//png/${arg}} - done < <(find -name *.png) + done < <(find -name *.png -not -iwholename ./logo.png) done done -- 2.39.2