Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. file="./icon.png"
  4.  
  5. iosNames=( icon-60 icon-60@2x icon-60@3x icon-76 icon-76@2x icon-40 icon-40@2x icon icon@2x icon-72 icon-72@2x icon-small icon-small@2x icon-50 icon-50@2x )
  6. iosSizes=( 60 120 180 76 152 40 80 57 114 72 144 29 58 50 100 )
  7.  
  8. androidNames=( ldpi mdpi hdpi xhdpi xxhdpi xxxhdpi )
  9. androidSizes=( 36 48 72 96 144 192 )
  10.  
  11. # make directories
  12. mkdir res
  13. cd ./res
  14. mkdir ios android
  15. cd ..
  16.  
  17. # iOS
  18. for (( i=0; i<${#iosNames[@]}; i++ ));
  19. do
  20. cp ${file} "./res/ios/${iosNames[$i]}.png"
  21. sips -Z ${iosSizes[$i]} "./res/ios/${iosNames[$i]}.png"
  22. done
  23.  
  24. # Android
  25. for (( i=0; i<${#androidNames[@]}; i++ ));
  26. do
  27. cp ${file} "./res/android/${androidNames[$i]}.png"
  28. sips -Z ${androidSizes[$i]} "./res/android/${androidNames[$i]}.png"
  29. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement