Add help messages to the build script #47
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This might be just me, but figuring out how to run this script has cost me 10 minutes of my time and some light lua debugging. This script has a pretty poor user experience. In order to improve it I've added the help message that is displayed whenever the build script is invoked with at least one of the commonly-used options for getting help:
Whenever the build script is executed without either -x64 or -a64 option I've also improved on the output of the script, telling what exactly needs to be typed, and also directing the user to the real help message. Since running the build script without any options and seeing what happens is the first thing anyone looking at the build script will do I see this as a good way of directing users to some kind of documentation as soon as possible.
Minor thing, but I've also fixed the error code of the script when running without the non-optional argument for arch. I think it's more fitting to use the error code 2, which is commonly used for CLI-related errors.