#!/bin/bash
mkdir theme
pushd theme
clear
echo 'Enter the name of your theme. No spaces please.'
read name
echo '<themename>'$name'</themename>' >> $name.xml
clear
echo 'Theme name : '$name''
echo ''
echo ''
echo ''
echo ''
echo ''
echo 'Enter the theme version'
read version
echo '<themeversion>'$version'</themeversion>' >> $name.xml
clear 
echo 'Theme name : '$name''
echo 'Theme name : '$version''
echo ''
echo ''
echo ''
echo ''
echo ''
echo 'Enter your name as you would like it to appear under Theme Author'
read author
echo '<author>'$author'</author>' >> $name.xml
clear 
echo 'Theme name : '$name''
echo 'Theme version : '$version''
echo 'Theme author : '$author''
echo ''
echo ''
echo ''
echo ''
echo ''
echo 'Enter the name of the phone this Metamorph is designed for'
read phone
echo '<phone>'$phone'</phone>' >> $name.xml
clear 
echo 'Theme name : '$name''
echo 'Theme version : '$version''
echo 'Theme author : '$author''
echo 'Phone : '$phone''
echo ''
echo ''
echo ''
echo ''
echo ''
echo 'Enter the rom this Metamorph is designed for'
read rom
echo '<rom>'$rom'</rom>' >> $name.xml
clear 
echo 'Theme name : '$name''
echo 'Theme version : '$version''
echo 'Theme author : '$author''
echo 'Phone : '$phone''
echo 'Rom : '$rom''
echo ''
echo ''
echo ''
echo ''
echo ''
echo 'If you would like a short description of your theme, press 1. If you dont want to put a description, press 2.'
echo 'Option : '
read desc
if [ $desc == 2 ]
then
clear
echo 'Theme name : '$name''
echo 'Theme version : '$version''
echo 'Theme author : '$author''
echo 'Phone : '$phone''
echo 'Rom : '$rom''
echo ''
echo ''
echo ''
echo ''
echo ''
echo 'If this is correct press enter. If this information isnt right, please go into the xml and edit it manually. Then, to continue run the app script.'
read enterKey
clear

echo ' ' >> $name.xml

popd
./app

elif [ $desc == 1 ]
then 
clear
echo 'Enter a short description here.'
read desc1
clear
echo 'Theme name : '$name''
echo 'Theme version : '$version''
echo 'Theme author : '$author''
echo 'Phone : '$phone''
echo 'Rom : '$rom''
echo ''$desc1''
echo ''
echo ''
echo ''
echo ''
echo ''
echo 'If this is correct press enter. If this information isnt right, please go into the xml and edit it manually. Then, to continue run the app script.'
read enterKey
clear

echo '<description>'$desc1'</description>' >> $name.xml 
echo ' ' >> $name.xml

popd
./app

fi

read enterKey


