Create a gist now

Instantly share code, notes, and snippets.

Automated build of Icon/Loading Files
#!/bin/sh
# **********************************************************
# convertImages.sh
#
#
# Created by Greg Mccormick on 3/25/12.
# Copyright (c) 2012 Crushmedia, LLC. All rights reserved.
# **********************************************************
# Set your workspace below
#
# add 3 files to your project folder
# icon file should be named app icon.png
# default landscape should be named default_L.png
# default portrait should be named default_P.png
# make note of the exact name of your project in your workspace
#
# **********************************************************
clear
#update the path to your project workspace here
echo "#######################################################"
echo " Created by Greg Mccormick on 3/25/12."
echo " Copyright (c) 2012 Crushmedia,LLC. All rights reserved."
echo "#######################################################"
#get the exact app name as it is in the tifolder
echo "Enter the App Name "
read -e APPNAME
# change this to your path
cd ~/Documents/
cd $APPNAME
#remove the current iPhone and android folders and all the files in them
rm -rf ./Resources/iphone
rm -rf ./Resources/android
mkdir ./Resources/iphone
mkdir ./Resources/android
mkdir ./Resources/android/res-long-port-hdpi
mkdir ./Resources/android/res-long-port-ldpi
mkdir ./Resources/android/res-notlong-port-hdpi
mkdir ./Resources/android/res-notlong-port-ldpi
mkdir ./Resources/android/res-notlong-port-mdpi
mkdir ./Resources/android/res-notlong-land-mdpi
mkdir ./Resources/android/res-notlong-land-ldpi
mkdir ./Resources/android/res-notlong-land-hdpi
mkdir ./Resources/android/res-long-land-ldpi
mkdir ./Resources/android/res-long-land-hdpi
convert -geometry 512x512 -quality 100 appicon.png ./Resources/iphone/appicon@512.png
convert -geometry 114x114 -quality 100 appicon.png ./Resources/iphone/appicon@2x.png
convert -geometry 29x29 -quality 100 appicon.png ./Resources/iphone/appicon-Small.png
convert -geometry 50x50 -quality 100 appicon.png ./Resources/iphone/appicon-Small-50.png
convert -geometry 72x72 -quality 100 appicon.png ./Resources/iphone/appicon-72.png
convert -geometry 57x57 -quality 100 appicon.png ./Resources/iphone/appicon.png
convert -geometry 144x144 -quality 100 appicon.png ./Resources/iphone/appicon-144.png
convert -geometry 128x128 -quality 100 appicon.png ./Resources/android/appicon.png
convert -geometry 1024x748 -quality 100 default_L.png ./Resources/iphone/Default-Landscape.png
convert -geometry 768x1004 -quality 100 default_L.png ./Resources/iphone/Default-Portrait.png
convert -geometry 319x480 -quality 100 default_L.png ./Resources/iphone/Default.png
convert -geometry 639x960 -quality 100 default_L.png ./Resources/iphone/Default@2x.png
convert -geometry 480x800 -quality 100 default_P.png ./Resources/android/res-long-port-hdpi/default.png
convert -geometry 240x400 -quality 100 default_P.png ./Resources/android/res-long-port-ldpi/default.png
convert -geometry 480x800 -quality 100 default_P.png ./Resources/android/res-notlong-port-hdpi/default.png
convert -geometry 240x320 -quality 100 default_P.png ./Resources/android/res-notlong-port-ldpi/default.png
convert -geometry 320x480 -quality 100 default_P.png ./Resources/android/res-notlong-port-mdpi/default.png
convert -geometry 480x320 -quality 100 default_L.png ./Resources/android/res-notlong-land-mdpi/default.pnp
convert -geometry 639x960 -quality 100 default_L.png ./Resources/android/res-notlong-land-ldpi/default.png
convert -geometry 800x480 -quality 100 default_L.png ./Resources/android/res-notlong-land-hdpi/default.png
convert -geometry 400x240 -quality 100 default_L.png ./Resources/android/res-long-land-ldpi/default.png
convert -geometry 800x480 -quality 100 default_L.png ./Resources/android/res-long-land-hdpi/default.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment