I was able to solve this problem. Everything was correct. I just needed to run the chmod +x packages/samples/*/build.sh and ensure the End-Of-Line sequence was set to LF.
chmod +x packages/samples/*/build.sh
I did the latter by simply changing the file in VS Code (bottom right).