When I changed the script to pull down the latest release of SDL2 (2.0.14), I found that the build fails at:
cd: SDL/Xcode-iOS/SDL: No such file or directory
I can confirm the directory no longer exists in SDL2-2.0.14, and that it was removed by this change: libsdl-org/SDL@dc60b97#diff-e78d57f4028aaaacb533e7660a35f93b41a4fc8d812e8b1b5c383345edf8955b
It's unclear to me what the proper fix is, unfortunately, but I am investigating on my own project.