Skip to content

Instantly share code, notes, and snippets.

@norm
Created December 5, 2021 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save norm/a36e90a2e5877947ba9c11a429a94a63 to your computer and use it in GitHub Desktop.
Save norm/a36e90a2e5877947ba9c11a429a94a63 to your computer and use it in GitHub Desktop.
adding GIF details to existing GIFs
files=($(find source -name \*.toml))
for file in "${files[@]}"; do
gif=$(echo $file | sed -e 's/toml$/gif/')
if ! grep -q info.filesize $file; then
echo "++ $file"
sed -i '' -e 's/^"""/"""\n\ninfo.colours = ""\ninfo.filesize = ""\ninfo.frames = ""\ninfo.size = ""\ninfo.time = ""/' $file
./script/gif_info $gif $file
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment