Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- file="./icon.png"
- 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 )
- iosSizes=( 60 120 180 76 152 40 80 57 114 72 144 29 58 50 100 )
- androidNames=( ldpi mdpi hdpi xhdpi xxhdpi xxxhdpi )
- androidSizes=( 36 48 72 96 144 192 )
- # make directories
- mkdir res
- cd ./res
- mkdir ios android
- cd ..
- # iOS
- for (( i=0; i<${#iosNames[@]}; i++ ));
- do
- cp ${file} "./res/ios/${iosNames[$i]}.png"
- sips -Z ${iosSizes[$i]} "./res/ios/${iosNames[$i]}.png"
- done
- # Android
- for (( i=0; i<${#androidNames[@]}; i++ ));
- do
- cp ${file} "./res/android/${androidNames[$i]}.png"
- sips -Z ${androidSizes[$i]} "./res/android/${androidNames[$i]}.png"
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement