Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

get-powerbash

The installer served at get.powerbash.org, for machines without Homebrew.

curl -s https://get.powerbash.org | bash

Where Homebrew is available, brew install powerbash/powerbash/powerbash is the path to prefer — powerbash then upgrades along with everything else. This installer is fully supported either way, and is the answer for the many machines that will never have brew on them.

To remove it again:

curl -s https://get.powerbash.org | bash -s -- uninstall

What it does

  • Downloads powerbash.sh from https://download.powerbash.org/powerbash.sh into ${XDG_DATA_HOME:-~/.local/share}/powerbash/, and verifies it looks like powerbash before putting it in place.
  • Links it into ~/.bashrc.d/ if that directory exists (Fedora/RHEL), and otherwise appends a marked block to ~/.bashrc — or ~/.bash_profile on macOS, where terminals start login shells.
  • Re-running upgrades in place. Nothing is duplicated.
  • Uninstalling removes exactly the marked block it added, leaving the rest of your startup file byte-for-byte as it was. Your saved settings in ~/.config/powerbashrc are left alone.

It refuses to run as root. powerbash is a per-user tool; a multi-user install is two manual commands and is documented — with its caveats — at powerbash.org/docs.

Environment

Variable Default
POWERBASH_URL https://download.powerbash.org/powerbash.sh
POWERBASH_INSTALL_DIR ${XDG_DATA_HOME:-~/.local/share}/powerbash

Layout

index.html is the script. GitHub Pages serves it verbatim as the index of get.powerbash.org, which is what makes curl … | bash work; .nojekyll stops Pages from trying to process it.

Tests

make                # list every target
make check          # lint, the round trip, and the round trip under bash 3.2

Every case runs against a temporary $HOME and a file:// URL, so the suite never touches the machine running it. tests/install-test.sh also runs on its own — it has to, since it runs inside a bash 3.2 container with no make in it. CI calls the same targets.

License

MIT — see LICENSE.

About

Get powerbash

Resources

Stars

0 stars

Watchers

2 watching

Forks

Contributors

Languages