If you want to use Argbash locally, you have to download the software package and run the installation script.
Go to the release section of the GitHub project, choose the version to download, and download the source code package.
Unpack the contents of the archive. You can use the
bin/argbashscript without any installation (as it is described in the Quickstart), but you can proceed to the installation in order to be able to use
Go to the
resourcesfolder. There is a
According to whether you have your
$HOME/.local/binfolder in the
- If so, run
make install PREFIX=$HOME/.local,
- else, run
sudo make install PREFIX=/usr.
If you want multiple
Argbashversions installed in parallel, install them using
make altinstall(and uninstall using
make uninstall) commands. This will create
argbash-X.Y.Zscript under the
argbashsymlinks pointing transitively to it. If you altinstall another version of
Argbash, the common symlinks will be overwritten (i.e. at least
This way of installation won’t install the
- If so, run
Optional: Run some checks by executing:
make check(still in the
resourcesfolder). You should get a message
All is OKat the bottom.
Argbash has this audience:
- Users — people that use scripts that make use of
- Developers — people that use
Argbashto write scripts.
- Tinkerers — people that come in contact with
Argbashinternals, typically curious Developers.
bash >= 3.0— this is obvious, everybody needs
bash. There is only one exception — in cases of simple scripts, a
dashwill be enough for Users.
autoconf >= 2.63—
Argbashis written in a
m4language extension called
m4sugar, which is contained in
autoconf. Developers and Tinkerers need this.
autoconfis available on Linux, macOS, BSDs and can be installed on MS Windows.
test. If you have
autoconf, you probably have those already.
GNU Make >= 4.0— the project uses Makefiles to perform a wide variety of tasks, although it is more of interest to Tinkerers.
If you identify yourself as a tinkerer (i.e. you want to play with internals of
Argbash), you may use a different set of steps:
Clone the Git repository:
git clone https://github.com/matejak/argbash.git
Go to the
resourcesdirectory consider running a develop install there, e.g.
make develop PREFIX=$HOME/.local,
This type of installation ensures that whenever you make a change to the
bin/argbashscript in the repository, the
argbashcommand always calls that
After you make modifications the source files (
.m4files in the
srcdirectory), you regenerate
make ../bin/argbashin the
If you let a bug through that prevents the
argbashscript to regenerate itself, run
make bootstrapto regenerate it in a more robust way.
Remember to run
make checkin the
resourcesdirectory often to catch bugs as soon as possible.
Argbash package consists of these scripts:
argbash, the main part of
Argbash. It is basically a wrapper around the
autom4teutility that uses the
Argbash“source code” located in the
srcdirectory. In course of an installation, both the script and the source are copied under the prefix — script goes to
$PREFIX/binand source to
argbashscript itself is generated using
Argbash. It can be (re)generated using a Makefile that can be found in the
yare major version numbers) that assist users in modifying their scripts in case that
Argbashchanges its API. For example,
Argbash 2.1.4(we say
Argbashof major version 2) has
Argbashof major version 3 will have scripts
The main Makefile¶
Makefile in the
resources folder can do many things:
make install [PREFIX=foo]runs the installation into the prefix you can specify (default is
$(HOME)/.local). This will install the
argbashscript (notice the missing
$PREFIX/bin(and some support files into
make develop [PREFIX=foo]is similar to
make install, but it installs a wrapper around the local
bin/argbash, so any change to the file will be immediately reflected for everybody who uses the system-wide one. This is inspired by Python’s
python setup.py developpattern.
make uninstall [PREFIX=foo]inverse of the above.
make bootstrapmakes (or updates) the
argbashscript (the script basically overwrites itself). Use the latter if previous update broke the current
../bin/argbashso it is not able to regenerate itself.
make examplescompiles examples from
.shfiles in the
make foo/bar.shgenerates a script provided that there is a
make foo/bar2.shgenerates a script provided that there is a
make checkruns the tests.
make version VERSION=1.0.0sets the project’s version to all corners of the project where it should go.
make release [VERSION=1.0.0]refreshes date in the
ChangeLogand regenerates all of the stuff (and runs tests).
make tagtags the version.