#! /bin/sh -v # # make animated gif from pgm files # convert delay is in hundreths of a second, # loop 0 is infinite, loop 5 is five times, etc., # dispose previous hides prior frame # ref: https://webinista.com/updates/how-to-create-animated-gifs-imagemagick/ # # use delay 100 for small.gif # use delay 50 for sequential.gif # delay="20"; if [ -n "$1" ]; then delay="$1"; fi convert -delay "$delay" -loop 1 -dispose previous TMP/*.pgm TMP/wordle.gif