Expanded script to account for bare installs