Requires curl, jq, and tar (optionally 7z if downloading Windows artifacts).
Bash version of #1285609681171251330 until I finish my FXServer resource/build manager some time in the future.
If the folder isn't empty the installation won't continue. You can use the -f parameter to forcefully install.
Supports installing both win32 and linux artifacts. It auto-detects the platform, so if you're on Windows with MSYS2 or cygwin it uses win32 by default, and otherwise linux. You can still supply a platform with the -P parameter.
Examples:
# Print information about the script
$ ./path/to/install_artifact.sh -h
# This will install the latest artifact to the ./artifact directory
$ ./path/to/install_artifact.sh -p ./artifact
# This will install the recommended artifact to the ./artifact directory
# Supports critical, recommended, optional, and latest
$ ./path/to/install_artifact.sh -p ./artifact -b recommended
# This will install the artifact 7290 to the ./artifact directory
$ ./path/to/install_artifact.sh -p ./artifact -n 7290
# This will install the recommended win32 artifact to the ./artifact directory
# Supports win32, and linux
$ ./path/to/install_artifact.sh -p ./artifact -b recommended -P win32
