added bash code from download_and_compile