Improve the compileDeploy shell script to be more generic