Linux shell scripts refactored

autobuild and autoclean linux shell scripts refactored and cleaned up.