Try something like this:
#!/bin/sh
cd /var
echo "Installing THEOS"
echo
/usr/bin/git clone git://github.com/coolstar/theos.git && echo "Done."
echo
echo "Installing Ryan petrich's dumped $THEOS headers"
echo
cd /var/theos/headers
/usr/bin/git clone git://github.com/rpetrich/iphoneheaders.git
echo
echo "Installing SDK..."
echo
mkdir /var/theos/sdks/
cd /var/theos/sdks/
wget http://iphone.howett.net/sdks/dl/iPhoneOS7.1.sdk.tbz2 -q
bzip2 -d iPhoneOS7.1.sdk.tbz2
tar xfv iPhoneOS7.1.sdk.tbz2 -C /var/theos/sdks/
rm /var/theos/sdks/iPhoneOS7.1.sdk.tbz2
echo
-----------------------
Now you need to add Coolstar's repo using postinst, modifying the etc/apt/sources.list.d/cydia.list and adding coolstar's repo then running apt-get update then you would run the commands below.
We can work on this but try the above so far.
apt-get install libgcc
echo
apt-get install org.coolstar.iostoolchain
echo
apt-get install org.coolstar.cctools
echo
apt-get install git
echo
apt-get install org.coolstar.perl
echo
apt-get install curl
echo
echo "$THEOS and all iphoneos building dependencies have been configured! This script was developed by KingRalph. Extra credit goes to DiDA and BlackHippy for their help with installing debian dependencies"
echo
reboot
You can set dependencies in the control file also (wget, rsync, iostoolchain). Without those the installation will not proceed. But it would be better if they were inside the postinst script.