the stupid build tool
Find a file
2022-04-15 12:54:12 +00:00
license lowercase 2020-05-07 20:17:17 +01:00
readme explain things a bit better 2022-04-15 12:54:12 +00:00
tool update readme 2020-05-07 20:16:06 +01:00
tool-anywhere initial commit 2020-05-07 19:47:54 +01:00

tool
====

simple and minimalistic script/build tool.

install
-------

installing in your project:

	curl -L https://zxq.co/rosa/tool/-/raw/master/tool > tool
	chmod +x tool

(-L on curl follows 301 and 302 redirects)

installing tool-anywhere:

	mkdir -p ~/bin
	curl -L https://zxq.co/rosa/tool/-/raw/master/tool-anywhere > ~/bin/tool
	chmod +x ~/bin/tool
	# if you don't have ~/bin:
	echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc
	source ~/.bashrc

usage
-----

tool is simply a collection of short bash scripts that are useful to your
project. in the default tool, there are a few commands which may be used in a
project that uses multiple docker compose files (so that you can use
"./tool dev up" and "./tool prod up"). but seeing as everything is just a bash
script, you can virtually do anything!

to add commands, you simply need to add them to the documentation like in the
format that is already given and then add the product in the `case` statement.

of course, tool is just a base and you can set it up to do whatever you need.
it's basically a boilerplate code that you adjust based on your needs.

tool-anywhere
-------------

it may be useful to have the `tool` command in your PATH, in order to execute
it without having to prefix it with the directory it is in every time. this
also enables you to have scripts which work on paths in other directories
without having to screw around with paths too much. for this reason, there is
tool-anywhere. you install it as `tool` in your `$PATH`, and when you run it
it will run the first `tool` executable it finds when traveling up the
directory tree.

why?
----

while developing personal and professional projects, i tend to work with go
which requires no build tools at all apart from its compiler (which is very
often invoked without flags). however, there are many "companion" scripts
which often end up in a "scripts" directory or similar, which tends to have
a collection of these in a badly-documented manner.
the idea of tool is not new and there are many similar projects with
other names, all of which do essentially the same thing: collection of
scripts within a single bash executable without dependencies. it's not hard
to do, you just need to do a script which does a case switch on $1.
however, tool has a focus on user documentation and on making quite
straightforward to add commands to its internal documentation.
all in all, the only two "significant" features that tool has are
"tool-anywhere" and "tool help". so if like me that's all you need, then tool
will be your best friend!

license
-------

public domain (unlicense).