Smashing Bash into Pieces
Find a file
2025-02-16 11:32:35 +01:00
bin Version 1.0.0 2025-02-16 00:28:09 +01:00
src Fix conflict between variables with same name 2025-02-16 00:27:51 +01:00
.gitignore Upgraded bashing.dev 2013-06-01 15:51:46 +02:00
bashing.project Bump version to 1.0.0 2025-02-15 22:17:39 +01:00
LICENSE upgrade license year. 2015-04-15 14:12:48 +02:00
README.md Update stable version in README 2025-02-16 11:32:35 +01:00

bashing

bashing is a small tool that let's you create single-file Bash tools in a multi-file way.

Current stable Version: 1.0.0

Setup

Dependencies

bashing needs the GNU variant of sed to function properly. If you're on MacOS you can use e.g. Homebrew to install the package gnu-sed.

Installation

mkdir -p ~/.bin
curl -ko ~/.bin/bashing https://codeberg.org/xsc/bashing/releases/download/latest/bashing.sh
chmod +x ~/.bin/bashing

Make sure ~/.bin is on your $PATH, e.g. by adding export PATH="$PATH:~/.bin" to your .bashrc.

Usage

Have a look at the wiki and the Quickstart Tutorial. And if you want to examine a full-fledged Bashing project, why not Bashing itself?

$ bashing new greet
Initializing ./greet ...
Successfully initialized './greet'.
$ cd greet

$ bashing new.task hi
Created Task 'hi'
$ bashing run hi
Hello from Task 'hi'
$ bashing uberbash
Creating /git/public/shell/greet/target/greet-0.1.0-SNAPSHOT.sh ...
Uberbash created successfully.

$ ./target/greet-0.1.0-SNAPSHOT.sh
Usage: ./target/greet-0.1.0-SNAPSHOT.sh <command> [<parameters> ...]

    hello    :  (no help available)
    help     :  display this help message
    hi       :  (no help available)
    version  :  display version

$ ./target/greet-0.1.0-SNAPSHOT.sh hi
Hello from Task 'hi'

$ ./target/greet-0.1.0-SNAPSHOT.sh version
greet 0.1.0-SNAPSHOT (bash 4.2.25(1)-release)

$ bashing install
Creating /git/public/shell/greet/target/greet-0.1.0-SNAPSHOT.sh ...
Uberbash created successfully.
Deploying to /home/yannick/.bin/greet ...
Deployed successfully.

$ greet version
greet 0.1.0-SNAPSHOT (bash 4.2.25(1)-release)

Bashing Bashing

To build bashing, check out this repository and run:

$ ./bin/bashing uberbash
Creating /git/public/bashing/target/bashing-0.1.0-SNAPSHOT.sh ...
Uberbash created successfully.

This will create a standalone bashing script using bashing itself!

License

Copyright © 2013-2025 Yannick Scherer

Bashing is distributed under the MIT License.