Import bash scripts and fix OS specific problems in comp