Currently I'm setting up a new system using the new Xubuntu trusty tahr.
I'm not very familiar with shell scripting, but I have one which needs the OSTYPE environment variable to determine what to do.
If I call
OSTYPE environment variable is not recognized by the original Bourne shell, which is what is being invoked by the first line of your script.
Replace it with:
as appropriate to your setup.