binary
Source code
This file contains functions for working with binaries
Index
binary::exists
Check if a binary exists
Example
Arguments
- $1 (string): binary name
Exit codes
- 0: If the binary exists
- 1: If the binary does not exist
Output on stderr
- The binary is required to run this script
binary::github
Download a binary from github
Example
Arguments
- $1 (string): path to binary
- $2 (string): GitHub repository
- $3 (string): file to download
- $4 (string): [opt] tar file to extract
binary::arch
Get the architecture of the system
Example
Output on stdout
- The architecture of the system
binary::jq
Download the jq binary into $PATH_BIN if it does not exist
Example
binary::vale
Download the vale binary into $PATH_BIN if it does not exist
Example
Was this section helpful?