#!/bin/bash # Generate another svg without the mountain sed 's/0,0.810396 -0.110551,1.59242 -0.300781,2.34375 l -4.537109,-5.0429688 -5.800781,6.5996098 2.798828,-5.5996098 -1.398438,-2.5 -8.2460935,9.4765628 C 2.5486997,15.265661 1.9609375,13.451673 1.9609375,11.5/0,10.430612 -19.0781245,11.535227 -19.0781245,0/g' spices-update-symbolic.svg > spices-update-arrow-symbolic.svg # Convert both svg files to png inkscape -w 1024 -h 1024 spices-update-arrow-symbolic.svg -e spices-update-arrow-symbolic.png > /dev/null inkscape -w 1024 -h 1024 spices-update-symbolic.svg -e spices-update-symbolic.png > /dev/null # Diff png files to extract mountain convert spices-update-symbolic.png spices-update-arrow-symbolic.png -compose DstOut -composite spices-update-mtn.png # Generate rotating gif from arrow image convert spices-update-arrow-symbolic.png -duplicate 36 -virtual-pixel transparent -distort SRT %[fx:t*360/n] -set delay 10 -set dispose background -loop 0 rotating-arrow.gif # Overlay mountain on arrow gif convert rotating-arrow.gif null: -gravity east spices-update-mtn.png -layers composite loader.gif