#!/bin/bash
clear
name=*
echo 'Would you like to continue theming an app? yes or no? '
read opt

if [ $opt == no ]
then 
clear
echo 'If you done, finish up by adding your images and zipping it all up.Remember to name the zip the same as you named the theme in the first step or MetaMorph will give you issues.'
read enterKey
exit
fi

if [ $opt == yes ]
then
pushd theme
clear
echo 'Enter the name of the apk you will be theming. Remember that this is also how the app that you have installed on yor phone must be named.Do not include the .apk'
echo ''
echo 'For example, for Gallery.apk, use Gallery. If your using framework-res.apk, use only framework-res'
read app
mkdir $app
mkdir $app/res
mkdir $app/res/drawable
mkdir $app/res/drawable-mdpi
mkdir $app/res/drawable-land-mdpi
mkdir $app/res/drawable-port-mdpi
mkdir $app/res/drawable-hdpi
mkdir $app/res/drawable-land-hdpi
mkdir $app/res/drawable-port-hdpi
echo '<item>'$app'.apk</item>' >> $name.xml
if [ $app == framework-res ]
then echo '<path>/system/framework/</path>' >> $name.xml
echo '<description>Requires reboot</description>' >>$name.xml
echo ' ' >> $name.xml
clear ; echo 'Press enter to continue'
read enterKey
else 
clear 
echo '<path>/system/app/</path>' >> $name.xml
echo " " >> $name.xml
clear 
echo 'Remeber to have these apps installed in /system/app. You can use adb, root explorer or any other root file manager.'
read enterKey
fi
fi
popd
./app







