Web executable launcher
Project description
wrun
wrun
downloads, caches, and runs an executable,
with the same one command for multiple OS/architectures.
$ wrun -help
Usage of wrun:
-archive-exe-path value
[OS/arch=]path to executable within archive matcher (separator always /, implies archive processing)
-dry-run
Dry run, skip execution (but do download/set up cache)
-http-timeout duration
HTTP client timeout (default 5m0s)
-url value
[OS/arch=]URL matcher (at least one required)
-use-pre-commit-cache
Use pre-commit's cache dir
wrun downloads, caches, and runs executables.
OS and architecture matcher arguments for URLs to download and (if applicable) executables within archives can be used to construct command lines that work across multiple operating systems and architectures.
The OS and architecture wrun was built for are matched against the given matchers.
OS and architecture parts of the matcher may be globs.
Order of the matcher arguments is significant: the first match of each is chosen.
As a special case, a matcher argument with no matcher part is treated as if it was given with the matcher */*.
On Windows, .exe is automatically appended to any archive exe path resulting from a */ prefixed match.
URL fragments, if present, are treated as hashAlgo-hexDigest strings, and downloads are checked against them.
The first non-flag argument or -- terminates wrun arguments.
Remaining ones are passed to the downloaded one.
Environment variables:
- WRUN_CACHE_HOME: cache location, defaults to wrun subdir in the user cache dir
- WRUN_OS_ARCH: override OS/arch for matching
- WRUN_VERBOSE: output verbosity, false decreases, true increases
Installation
Prebuilt binaries are available in project releases, apt and yum package repositories at Packagecloud.
Prebuilt binaries are also available from PyPI,
in the wrun-py
package,
installable for example with pip
:
python3 -m pip install wrun-py
To build and install from sources, Go is required.
go install github.com/scop/wrun@latest
URL matching
URLs are matched against the Go toolchain wrun was built with using
the OS/architecture=
prefix given along with the URLs. Valid values
for these come from Go, the list is available by running
go tool dist list
, or from
Go sources.
OS and architecture may contain globs. The special case where the
OS/architecture=
prefix is left out is treated as if */*=
was
given.
Order of specifying the URLs is significant; the first matching one is chosen.
Download digests
To verify downloads against known good digests, place a digest in the URL
fragment.
The fragment format to use is digestAlgo-hexDigest
.
For example:
#sha256-2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9842
#sha512-9b71d224bd62f3785d96d46ad3ea3d73319bfbc2890caadae2dff72519673ca72323c3d99ba5c11d7c7acc6e14b8c5da0c4663475c2e5c3adef46f73bcdec043
#md5-5d41402abc4b2a76b9719d911017c592
)
CI usage
Cache resides by default in the
$XDG_CACHE_HOME
/wrun
directory. $WRUN_CACHE_HOME
overrides it.
If the -use-pre-commit-cache
flag is given, a subdirectory in
pre-commit's cache dir is used instead.
pre-commit.ci is not supported, because it disallows network access at runtime.
Examples
The generators directory contains scripts that can be used to generate command line arguments for various tools commonly used tools.
License
SPDX-License-Identifier: Apache-2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for wrun_py-0.2.0.post1-py2.py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b59f89ea958f236de4d832fdfafbb5d59719fc51da15167829a0be1bf1c6c8aa |
|
MD5 | b5222eb34d2a08570214ae06ba5c033e |
|
BLAKE2b-256 | 5d6dab045fa538aee560489f29a1a762f1c28d4822fbaee64115bacf4d3c83c2 |
Hashes for wrun_py-0.2.0.post1-py2.py3-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c0338f159151134dd60f335ae4a35c92d7602236e07d18eff730a3ea7a52362 |
|
MD5 | 91f69d4d7b912ce2fa12546338f018ab |
|
BLAKE2b-256 | b9a4fb6542b8ffdedc388aa8f22ca95ff6564b38f86a79691a1c33086681a442 |
Hashes for wrun_py-0.2.0.post1-py2.py3-none-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b5306fdae4dd9dd3307c9e7bcc4ba6bd834098452b9393c795eb578a2eb11b4 |
|
MD5 | b2ba9c670bb23100e6f8d030c2cf7472 |
|
BLAKE2b-256 | f8ba86643c51e9c9e25584d9bd554fe563efdcb8cd06b4a3915fd77e37f5f44b |
Hashes for wrun_py-0.2.0.post1-py2.py3-none-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfc169dbc4799398bf3bd106cb4ec9bcfce6e646bb8aadb750aa5d021212b39a |
|
MD5 | 6593faa03cd6ad30839eeca084575106 |
|
BLAKE2b-256 | 296a204caac91bc4835b4c3a7d19c191a3b29a06ec5986777010fe9b3637813d |
Hashes for wrun_py-0.2.0.post1-py2.py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72b3fe327eee638f67f85eb5b82a103fff2484855b8d408fd23caac45ed33e41 |
|
MD5 | 6283656bdf18753641c9ffd7f97c99fd |
|
BLAKE2b-256 | 76edf2df6500d7a8031af9bddc277de38eea2e79a8a823ee9890105bbf39f4f3 |
Hashes for wrun_py-0.2.0.post1-py2.py3-none-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69fb0afdef825ab48ecf055fbbaa24111990d38230420ba69c7deb649e12e0f6 |
|
MD5 | f4b19301a1a9f345be000dab2f88f58f |
|
BLAKE2b-256 | 2f0450f9f30810967132948a08b78de68aab091128c4ab1468811eaf2301d20c |
Hashes for wrun_py-0.2.0.post1-py2.py3-none-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9b844bf4e5f958a58a5b75e239ed8a5a1aae2fc228b92acfc6ca50abb2d2b2a |
|
MD5 | ab0afac659a86434487e08248103be63 |
|
BLAKE2b-256 | 53e5353f1ac756ed000c06b4fcfad506fb9649ee4af68b4049b6eb495c8cf93e |