Skip to content

Instantly share code, notes, and snippets.

@agryson
Created December 15, 2016 11:33
Show Gist options
  • Save agryson/49cdcd579b73e923454d12021f15cbad to your computer and use it in GitHub Desktop.
Save agryson/49cdcd579b73e923454d12021f15cbad to your computer and use it in GitHub Desktop.
Loops through icons in a folder and alerts to any icons below standard size
#!/bin/bash
for file in *.svg
do
height=$(/usr/bin/inkscape -H $file)
width=$(/usr/bin/inkscape -W $file)
#Generally the icons have a bit of margin around them, so tune this value appropriately
if [[ $height < 55 ]] && [[ $width < 55 ]]; then
echo $file" : "$height" x "$width
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment