Revert "Attempt to fix kdevplatform_shell_environment"

This reverts commit 2bc4e2c5e396987fbf6beb4d7630018cdb934550.
Revert "Make shell scripts portable and stable."

This breaks compatibility with Debian. We rather want to stay compatible
with Debian instead of enabling compability with out-of-the-box OpenBSD.
OpenBSD users can still install bash if they want to use this script.

Another problem with this patch is that it obfuscates the code even
more. If people want to make this functionality work on all systems, we
should rather try starting rewriting this altogether. (E.g. by creating
a set of executables, and adding the parent directory to PATH or
something).

CCMAIL: persgray@gmail.com

This reverts commit 5186645ab0f845b495552fcda2ff9c68bce0dc7b.