./build -h
for help.
# Interactive build process
./build
# Generated Lobash file: <lobash-dir>/dist/lobash.bash
# Or no-interactive build process, build for Bash 4.0+
BASHVER=4.0 ./build
./build /usr/local/lobash.bash
# Generated Lobash file: /usr/local/lobash.bash
./build /usr/local/
# Generated Lobash file: /usr/local/lobash.bash
./build /usr/local/l.bash
# Generated Lobash file: /usr/local/l.bash
When you use Lobash to build a library or framework, it is necessary to set PREFIX with unique namespace for avoiding naming collisions.
# The prefix defaults to "l.". Build Lobash with prefix "lobash_".
./build -p lobash_
The PREFIX only effect Lobash public functions and variables names.
If use Lobash in a command, it's unnecessary to change the PREFIX.
./build
will export all modules by default. You can export specific modules with -c <config>
option.
cp config.example config
# Edit config, set PREFIX, BASH_MIN_VERSION and modules for building
./build -c ./config
# Default to BASHVER=4.1
./tools/build-build-image
# Build image with bash 4.4
BASHVER=4.4 ./tools/build-build-image
# Build image via proxy if you are in China
IN_CHINA=true ./tools/build-build-image
docker run -it --rm -v "`pwd`:/a" lobash/build:4.1 '/a/build /a/dist/'
./build -y -- <path>
NOTE: Do not use ./build -y <path>
.