This folder contains helpful scripts to be used in your bs.
Warning
Executing scripts downloaded from the internet poses a security risk. Always review the code before executing it. Only run scripts from trusted sources.
You can “install” these by just downloading them, for example:
wget https://raw.githubusercontent.com/jaandrle/bs/refs/heads/main/extensions/NAME -O bs/NAME…you can adjust your copy by just editing it.
This script prints various patterns to be used in bs scripts.
wget https://raw.githubusercontent.com/jaandrle/bs/refs/heads/main/extensions/templates.sh -O bs/templates.sh
bs/templates.sh # prints all templates
bs/templates.sh skeleton/bash > bs/new-task # creates a new task from template
bs/templates.sh bash/parallel >> bs/existing-task # appends patern to existing task
…or you can “install” it globally:
wget https://raw.githubusercontent.com/jaandrle/bs/refs/heads/main/extensions/templates.sh -O ~/.local/bin/bs-templates
chmod u+x ~/.local/bin/bs-templatesThis bash script can be used in your bash tasks, to force running tasks from project root (to ensure proper path resolution) and support --help by reading bs/README.md file.
wget https://raw.githubusercontent.com/jaandrle/bs/refs/heads/main/extensions/.hook-prerun.sh -O bs/.hook-prerun.sh
# task file
dir_script="$(dirname -- "${BASH_SOURCE[0]}")/"
. "$dir_script"/.hook-prerun.sh # adjust (relative to current task)
# available variables: dir_script, dir_bs, dir_root
This nodejsscript can be used as completion hook for your nodejsscript tasks.
wget https://raw.githubusercontent.com/jaandrle/bs/refs/heads/main/extensions/hook-completion-nodejsscript.mjs -O bs/.bsrc/hook-completion.mjs