Skip to content

Instantly share code, notes, and snippets.

@MikuroXina
Last active March 1, 2019 08:01
Show Gist options
  • Save MikuroXina/934e0c53fb0565bfe2b2f6d9db59d2a6 to your computer and use it in GitHub Desktop.
Save MikuroXina/934e0c53fb0565bfe2b2f6d9db59d2a6 to your computer and use it in GitHub Desktop.
Convert all ani files to each gif files (depended imagemagick & ani2ico https://gist.github.com/RkEclair/cc78aab9bba641928fbb577939ef5a9d)
#!/bin/sh
set -u
PATH='/usr/bin:/bin:/usr/local/bin'
IFS='
'
for f in *.ani; do
echo "Processing $f..."
ani2ico $f
icos=$(ls -v $f?.ico)
ls $icos # please comment it out if annoying
convert -dispose background -loop 0 -delay 20 $icos ${f%%.ani}.gif
done
rm -f *.ico
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment