Fix shell scripts used for platform builds