Skip to content

Installer script ​

bin/strauss-rs.sh downloads the right release for your operating system and CPU, checks its checksum, and runs it. The program is kept next to the script, and a .gitignore in the same folder keeps it out of your repository. Commit the script and the .gitignore.

sh
sh bin/strauss-rs.sh prefix   # install or update if needed, then run prefix
sh bin/strauss-rs.sh          # only install or update

Without STRAUSS_RS_VERSION, the latest release is looked for once a day. If it cannot be reached, the version already installed is used.

Settings ​

Set these as environment variables when running the script:

VariableWhat it does
STRAUSS_RS_VERSIONUse this release tag, such as v0.4.0, instead of the latest.
STRAUSS_RS_DIRWhere the program is kept. Defaults to the folder the script is in.
STRAUSS_RS_OFFLINESet to 1 to never look for an update.
STRAUSS_RS_GITIGNORESet to 0 to leave .gitignore alone.
STRAUSS_RS_REPOThe GitHub repository to download from. Defaults to craigrileyuk/strauss-rs.
STRAUSS_RS_BASE_URLWhere releases are downloaded from.
STRAUSS_RS_COMPOSERThe command that runs Composer, when prefix needs to rebuild Composer's autoloader and composer is not on your PATH.

To pin a version for everyone who works on the project, set it in your Composer script:

json
{
	"scripts": {
		"prefix-namespaces": ["STRAUSS_RS_VERSION=v0.4.0 sh bin/strauss-rs.sh prefix"]
	}
}

Released under the MIT licence. Strauss-RS is based on Strauss by Brian Henry.