I know this might be out of scope (because it will require cross-compiling?) but the script does not detect the CPU platform. Maybe a sane way to handle it would be just exit()-ing when a non-supported platform is detected?
Other than that, it looks like a great project!