#/bin/sh
#This script is used as a shortcut to all my #other thruTerm packages!
#this requires EricaUtilities
#By xK3y team
#This script must be run as Root
#Use this as your own. If it fails its not our fault.
if [ "$(id -u)" -eq 0 ] ; then


case "$1" in
     -c) echo "Where would you like to go?
Usage:
-h           cydia home
-p           packages
-s           sources
-t           storage"
echo "Enter Choice:"
         read x
case $x in
        -h)    echo "Opening Cydia home"
               openURL cydia:// ;;
                           
        -p)    echo "Opening Cydia to Packages"
               openURL cydia://packages ;;
                           
        -s)    echo "Opening Cydia to Sources"
               openURL cydia://sources ;;
               
        -t)    echo "Opening Cydia to Storage"
               openURL cydia://storage ;;
                                
        esac ;;
     -f) echo "Where would you like to go?
Usage:
-h           iFile home
-ld          Library/Downloads
-md          Media/Downloads
-l           Last-used
-r           root
-I           Installous Downloads
-D           Documents
-DD          Documents/Documents"
echo "Enter Choice:"
         read y
case $y in
         -h) ifile -h
              exit ;;
        -ld) ifile -ld
              exit ;;
        -md) ifile -md
              exit ;;
         -l) ifile -l
              exit ;;
         -r) ifile -r
              exit ;;
         -I) ifile -I
              exit ;;
         -D) ifile -D
              exit ;;
        -DD) ifile -DD
              exit ;;
        esac ;;
        -y)    echo "Opening Youtube"
               openURL youtube:// ;;
                           
        -i)    echo "Opening iTunes"
               openURL itms:// ;;
                           
        -a)    echo "Opening AppStore"
               openURL itms-apps:// ;;
               
        -g)    echo "Opening Google earth"
               openURL comgoogleearth:// ;;
         
        -c)    echo"Opening Gamecenter"
               openURL gamecenter:// ;;    
               
        -r)    echo "Opening an IRC client"
               openURL irc:// ;;
               
        -m)    echo "Opening Maps"
               openURL maps://near= ;;
               
        -ssh)  echo "Opening iSSH"
               openURL ssh:// ;;

        -os)   echo "Opening iOS Diagnostics.app"
               openURL diags:// ;;

		-fb)   echo "Opening Facebook"
	           openURL fb:// ;;

        -fce)   echo "Opening Facetime"
	           openURL facetime://Cykey@live.com ;;
	     
	    -fa)   echo "Type an E-mail/Phone number"

			   read x
			   
			   openURL facetime-prompt://"$x" ;;
		
		-ca)    echo "Type a phone number (NO SPACES!!! e.g. 8589456543)"
		       
		       read x
		
               openURL tel://"$x" ;;

		-sm)   echo "Type a Phone number (sms) (NO SPACES!!! e.g. 8589456543)"

			   read x

			   openURL sms:"$x" ;;
				
		-em)   echo "Type an email"

			   read x

		       openURL mailto:"$x"? ;;
		
		-tw)   echo "Opening Twitter"

			   openURL twitter:// ;;
					
		-tw)   echo "Opening Facebook"

			   openURL fc:// ;;	
			
		-sk)   echo "Type a Phone number (including country code)"

               read x

			   openURL skype:+"$x"?call ;;	
				
		
		-cc) echo "Type an app name (CASE SENSITIVE)"
		
		read x
		
		openURL $x"://" &> /dev/null ;;	

			   

	
	     esac ;       
case $l in
	     
*) echo "Usage:
-c      cydia
-f      ifile
-y      YouTube
-i      iTunes
-a      AppStore
-g      GoogleEarth
-r      IRC client
-m      Maps current location
-tw     Twitter
-ssh    iSSH app
-os     iOS Diagnostics.app
-em     Send an E-Mail
-cc     **BETA** Open Any App :) 
-fb     Facebook
-sk     Make a call with Skype

**iPhone 4 / iPod Touch 4G only**

-fce    Facetime
-fa     Facetime an someone 

**iPhone only**
-ca     Call someone :)
-sm     SMS"

esac ;

else echo "please run this script as root!"

exit
fi