Guest User

generate_loader.sh

a guest
Oct 29th, 2020
223
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. # Generate another svg without the mountain
  4. 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
  5. # Convert both svg files to png
  6. inkscape -w 1024 -h 1024 spices-update-arrow-symbolic.svg -e spices-update-arrow-symbolic.png > /dev/null
  7. inkscape -w 1024 -h 1024 spices-update-symbolic.svg -e spices-update-symbolic.png > /dev/null
  8. # Diff png files to extract mountain
  9. convert spices-update-symbolic.png spices-update-arrow-symbolic.png -compose DstOut -composite spices-update-mtn.png
  10. # Generate rotating gif from arrow image
  11. 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
  12. # Overlay mountain on arrow gif
  13. convert rotating-arrow.gif null: -gravity east spices-update-mtn.png -layers composite loader.gif
RAW Paste Data