meme-tools

Meme format tools
git clone git://r-36.net/meme-tools
Log | Files | Refs | README | LICENSE

commit e4521f8dd9985f217760fcb6961a660eade591ba
parent c192f0a0f44873c9662d8594f88df6b338e5bfda
Author: Christoph Lohmann <20h@r-36.net>
Date:   Thu, 25 May 2023 06:44:40 +0200

Clear up meme blob format.

Diffstat:
Mdir2meme | 12+++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/dir2meme b/dir2meme @@ -8,15 +8,21 @@ fi memefile="$1" outname="${memefile%.*}" -outzip="${outname}.memeblob.zip" +outzip="${outname}.meme.blob.zip" -printf "meme\n" > ${memefile} +[ ! -e "${memefile}" ] && printf "meme\n" > ${memefile} find . -type f \ | while read -r medianame; do + case "${medianame}" in + *.meme|*.memeblob.*) + continue + ;; + esac + filename="$(basename "${medianame}")" memetag="${filename%.*}" - printf "#%s %s\n" "${memetag}" "${filename}" >> ${memefile} + [ ! -e "${memefile}" ] && printf "#%s %s\n" "${memetag}" "${filename}" >> ${memefile} zip -u "${outzip}" "${filename}" done