Commit Graph

28 Commits

Author SHA1 Message Date
Manuel Streuhofer
539443b3ca Allow for multiline opt description in __usage. Fixes #7 2016-11-11 20:13:01 +01:00
Manuel Streuhofer
dfd799b4e5 b3bp sourced mode (#61)
If main.sh is being sourced instead of being executed it respects the
variables __usage and __helptext being defined beforehand. Its behaviour
will depend on the sourcing script. If __usage is defined but empty no
argument parsing is done. If __helptext is defined but empty no helptext
will be shown.

Logging support still exists as it did before. The environment variables
LOG_LEVEL and NO_COLOR are supported just as they were before.
2016-11-09 10:03:00 +01:00
Manuel Streuhofer
d2195eee3c mention the used license in each script header (#60)
turns out that the README.md explains that "... licensed under MIT ...
the LICENSE does not have to be bundled as long as ..." but the scripts
themselfs don't mention any license.

fixed that by adding a one line mention of the used license and the two
lines explaining that the header comments have to stay intact.
2016-11-08 21:15:46 +01:00
Manuel Streuhofer
f82bbe59b0 better logging. support for multiple lines. (#57)
* better logging: support for multiple lines

* renamed logging function from _fmt to __b3bp_log

* adding example to show how multiline logging works

the main idea is to be able to log e.g. the output of a command and
b3bp taking care of splitting and prefixing every line.

* simplified code, removed hacky space-at-EOL
2016-11-08 13:03:26 +01:00
Kevin van Zonneveld
35b51072b3 No more os detection (#41) 2016-06-24 13:12:41 +02:00
Kevin van Zonneveld
e56e21dc37 b3bp dogfooding for acceptance.sh 2016-06-21 13:51:51 +02:00
Kevin van Zonneveld
efefd5cf2b Update fixtures after introducing helptext 2016-06-21 13:08:43 +02:00
Kevin van Zonneveld
51213e8786 Fix test again, now that we got confirmed failures out of Travis OSX #10 2016-02-23 10:21:43 +01:00
Kevin van Zonneveld
6dc7e1f92a Don't use a subshell to handle diff failures. Refs #10 2016-02-23 10:16:58 +01:00
Kevin van Zonneveld
c111725665 Purposely fail. Does this pass OSX Travis build? 2016-02-23 10:10:39 +01:00
Kevin van Zonneveld
abb480c394 Use accptst prefix so we can re-use this thing elsewhere 2016-02-23 10:06:45 +01:00
Izaak Beekman
1143670cae
Update expected test output 2016-02-22 10:11:12 -05:00
Kevin van Zonneveld
1271bf807d Add tests for megamount and follow Library export best practices 2016-02-17 13:38:55 +01:00
Kevin van Zonneveld
7fbf9ea8e5 Add tests for templater and follow Library export best practices 2016-02-17 13:19:03 +01:00
Kevin van Zonneveld
707583a93c Fix paths 2016-02-17 13:01:18 +01:00
Kevin van Zonneveld
e538a2be34 Rename inival->ini_val 2016-02-17 12:58:28 +01:00
Kevin van Zonneveld
c3f5bcf8c9 Add tests for parse_url and follow Library export best practices 2016-02-17 12:58:18 +01:00
Kevin van Zonneveld
180282d97d Add tests for ini_val and follow Library export best practices 2016-02-17 12:48:57 +01:00
Kevin van Zonneveld
d365e8dcea Allow disabling colors via NO_COLOR environment variable 2016-02-16 22:19:40 +01:00
Kevin van Zonneveld
915f858d5e Add __os magic var 2016-02-16 22:19:08 +01:00
Kevin van Zonneveld
cdc69d9e03 Update colors 2016-02-16 22:05:19 +01:00
Kevin van Zonneveld
56721e9cd5 Add test for longopt parsing 2016-02-16 22:05:11 +01:00
Izaak Beekman
9d2bcdbfb4 Update expected test output
ATTN: @kvz I think I did this correctly, but please look through the
 Travis-CI output nonetheless.
2016-02-16 14:39:48 -05:00
Kevin van Zonneveld
dd5950975d Fix popd 2016-02-16 20:25:30 +01:00
Kevin van Zonneveld
30cfd19fd9 Add debug test scenario 2016-02-16 15:49:37 +01:00
Kevin van Zonneveld
dbedd8f983 Update fixtures 2016-02-16 15:33:57 +01:00
Kevin van Zonneveld
dde3b70596 Also replace tmp dir on Travis 2016-02-16 15:13:40 +01:00
Kevin van Zonneveld
63cd89a659 Set up basic acceptance testing #4 2016-02-16 15:01:26 +01:00