Dependency manager and source inliner for bash scripts.
curl -1fsSLR https://github.com/curatorium/bash-import/releases/latest/download/bash-import -o /usr/local/bin/bash-import
chmod +x /usr/local/bin/bash-import bash-import [-q] [-x <lvl: app|all>] <cmd: pack|fetch|install> [...args]
bash-import -h | Parameter | Description |
|---|---|
<cmd> |
Subcommand: fetch, pack, or install |
[-q|--quiet] |
Suppress output. |
[-x|--trace <lvl: app|all>] |
Level of debug tracing, "app" traces only this file, "all" also traces dependencies. |
[-h|--help] |
Print the help instructions |
Downloads remote dependencies from .deps/@https/* and .deps/@github/* paths.
bash-import fetch <file>
bash-import fetch < <file>
cat <file> | bash-import fetch | Parameter | Description |
|---|---|
<file> |
Input file. |
Inlines source .deps/... statements into a single output file.
bash-import pack <file> [-o <out>]
bash-import pack < <file> > <out>
cat <file> | bash-import pack > <out> | Parameter | Description |
|---|---|
<file> |
Input file. |
[-o|--out <out>] |
Output file. Default: /dev/stdout. |
Packs a script and installs it to /usr/local/bin.
bash-import install <file> [-o <out>] | Parameter | Description |
|---|---|
<file> |
Input file. |
[-o|--out <out>] |
Output file. Default: /usr/local/bin/. |
MIT