From a2c6ec309921935faa31fe163922498a7cb9055a Mon Sep 17 00:00:00 2001 From: Chemaclass Date: Sun, 6 Oct 2024 00:22:25 +0200 Subject: [PATCH] docs: add bashdep to installation page --- docs/installation.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/docs/installation.md b/docs/installation.md index 4fd00f06..baba44a5 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -48,6 +48,37 @@ We try to keep it stable, but there is no promise that we won't change functions Committing (or not) this file to your project it's up to you. In the end, it is a dev dependency. ::: +## bashdep + +You can manage your dependencies using [bashdep](https://github.com/Chemaclass/bashdep), +a simple dependency manager for bash. + +::: code-group +```bash-vue [install-dependencies.sh] +# Ensure bashdep is installed +[ ! -f lib/bashdep ] && { + mkdir -p lib + curl -sLo lib/bashdep \ + https://github.com/Chemaclass/bashdep/releases/download/0.1/bashdep + chmod +x lib/bashdep +} + +# Add latest bashunit release to your dependencies +DEPENDENCIES=( + "https://github.com/TypedDevs/bashunit/releases/download/{{ pkg.version }}/bashunit" +) + +# Load, configure and run bashdep +source lib/bashdep +bashdep::setup dir="lib" silent=false +bashdep::install "${DEPENDENCIES[@]}" +``` +```[Output] +Downloading 'bashunit' to 'lib'... +> bashunit installed successfully in 'lib' +``` +::: + ## Brew You can install **bashunit** globally in your macOS (or Linux) using brew.