Skip to content

Commit 5951c8d

Browse files
author
Daniel Ruthardt
authored
✨ Add support for Basher installation (#7)
Signed-off-by: Daniel Ruthardt <druthardt@linuxfoundation.org>
1 parent c8fc791 commit 5951c8d

File tree

4 files changed

+21
-10
lines changed

4 files changed

+21
-10
lines changed

README.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[![basher install](https://www.basher.it/assets/logo/basher_install.svg)](https://www.basher.it/package/)
2+
13
# Bash+ (bashp)
24

35
Bash+ (bashp) is an enhanced Bash scripting framework designed to extend the capabilities of
@@ -23,10 +25,23 @@ functionalities with ease.
2325

2426
## Getting Started
2527

26-
To get started with Bash+, clone this repository and ensure you have Docker installed, as it's
27-
required for fetching some of the packages. Ensure Git is configured correctly if you're using
28-
Bash+ in a Git-managed project. Bash+ intelligently adds dynamically included functions to
29-
`.gitignore`, keeping your repository clean.
28+
You can install Bash+ in two ways:
29+
30+
### Option 1: Using Basher (Recommended)
31+
32+
The easiest way to install Bash+ is using [Basher](https://www.basher.it/), a package manager for Bash scripts:
33+
34+
```bash
35+
# Install basher if you haven't already
36+
curl -s https://raw.githubusercontent.com/basherpm/basher/master/install.sh | bash
37+
38+
# Install Bash+
39+
basher install lf-certification/bashp
40+
```
41+
42+
### Option 2: Manual Installation
43+
44+
Alternatively, you can clone this repository and ensure you have Docker installed, as it's required for fetching some of the packages. Ensure Git is configured correctly if you're using Bash+ in a Git-managed project. Bash+ intelligently adds dynamically included functions to `.gitignore`, keeping your repository clean.
3045

3146
### Usage
3247

@@ -41,8 +56,7 @@ bashp yourscript.sh
4156
Here's a simple [example](hello-world.sh) to get you started with Bash+:
4257

4358
```shell
44-
#!./bashp
45-
# shellcheck shell=bash
59+
#!/usr/bin/env bashp
4660

4761
# Option 1
4862
# Include (once) using the "#include" directive

bashp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env bash
22
set -e
33

4-
PATH="$PATH:." \
54
bashpc "${1:-/dev/stdin}" | bash

bashpc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ include_dir="$(dirname "$script")/libs"
66

77
mkdir -p "$include_dir" || include_dir=$(mktemp -d)
88

9-
PATH="$PATH:." \
109
INCLUDE_DIR="$include_dir" \
1110
bashpp "$script" | sed '1s,^#!.*$,#!/usr/bin/env bash,'

hello-world.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#!./bashp
2-
# shellcheck shell=bash
1+
#!/usr/bin/env bashp
32

43
# Option 1
54
# Include (once) using the "#include" directive

0 commit comments

Comments
 (0)