bork for Mac
Bash-Operated Reconciling Kludge
bork — overview
Bork - Skylar MacDonald's Bork Fork
I still use Bork in the year 2021, so I forked it to fix it.
Bork puts the 'sh' back into IT. Bork Bork Bork.
the Swedish Chef Puppet of Config Management
Bork is a bash DSL for making declarative assertions about the state of a system.
Bork is written against Bash 3.2 and common unix utilities such as sed, awk and grep. It is designed to work on any UNIX-based system and maintain awareness of platform differences between BSD and GPL versions of unix utilities.
Installation
From source Clone this repository: Symlink the bork binaries into your $PATH:
via Homebrew (macOS) Install via Homebrew:
via npm Install via npm:
via pre-built package
Starting with version 0.13.0, packages are available for a handful of operating systems on the GitHub releases page. These are generally from CI and built unsigned, but SHA-1 hashes are always available.
Updating
Bork can update itself as part of satisfying your config file. Your config file should look something like this to update via git:
(This example relies on you being able to write to /usr/local; if your Bork is installed elsewhere you should replace the paths above.)
If you have Homebrew available to you, you can do this instead:
You can also specify the --HEAD option on the assertion to install Bork's main branch via Homebrew:
This will always keep the latest commit installed. Note that the latest commit will contain unreleased code that might break, so take care when using it.
Using a package manager is the recommended way to install, as then you can ensure you're only installing released versions of Bork, and rely on it to update Bork for you. If you prefer to use git, you can use bork version to show the status of your local repo or installation. This command should be able to tell you how you installed Bork (e.g. via git or Homebrew), and therefore how you should go about updating it.
Usage and Operations
Running bork without arguments will output some help:
Let's explore these in more depth:
Assertions and Config Files
At the heart of bork is making assertions in a declarative manner via the ok and no functions. That is, you tell it what you want the system to look like instead of how to make it look like that. An assertion takes a type and a number of arguments. It invokes the type's handler function with an action such as status, install, or upgrade, which determines the imperative commands needed to test the assertion or bring it up to date. There are a number of included types in the types directory, and bork makes it easy to create your own. The no function works as an opposite to ok -- an ok assertion will require the presence of something, and a no assertion will require its absence.
Here's a basic example:
Details
Bash操作的调和临时拼凑
How to install bork
- Open Terminal (press ⌘ + Space and type “Terminal”).
- If Homebrew is not installed yet, run the command below first.
- Run this command:
Latest 10 releases
Last updated 2024-02-01; current version v0.14.0, with the latest 5 releases listed.
| Version | Released | Type | Size | macOS | Windows | Linux |
|---|---|---|---|---|---|---|
| v0.14.0 | 2024-02-01 | Stable | 29 KB | Download | — | Download |
| v0.13.0 | 2021-08-02 | Stable | 25 KB | Download | — | Download |
| v0.12.0 | 2021-02-20 | Stable | — | — | — | — |
| v0.11.1 | 2021-02-09 | Stable | — | — | — | — |
| v0.13.0-rc.1 | 2021-07-29 | Pre-release | — | — | — | — |
Data from GitHub Releases; stable releases first, each group sorted newest first.
Compared with similar apps
Only public metadata is compared, with no subjective recommendation; see the compare pages for field-by-field comparisons.
| App | Version | License | Architecture | 30-day installs |
|---|---|---|---|---|
| bork | v0.14.0 | Apache-2.0 | CLI | 1 |
| dhall-bash | 1.42.2 | BSD-3-Clause | CLI | 1 |
| fabric-completion | 1 | MIT | CLI | 1 |
| rake-completion | v1.0.3 | MIT | CLI | 1 |
Similar apps: Command-line Tools
dhall-bash
You will probably want to read the language-agnostic README here:fabric-completion
Bash completion for Fabricrake-completion
completion-ruby: bash completion for Ruby-related commandssonar-completion
Bash autocompletion for sonarqube.kitchen-completion
Add instance names to the autocomplete list of certain commands. This is a very early work.rails-completion
completion-ruby: bash completion for Ruby-related commandsCategories: Command-line Tools