Revert "ISTWCMS-4835: updating rebuild script to use proper exit codes"
This reverts commit 4c02d711.