Commit Graph

15 Commits

Author SHA1 Message Date
Germain Masse
12ea4dd75f
Enable color in screen or tmux 2017-08-13 21:08:59 +02:00
Izaak Beekman
2d5506cb36
Perform syntax checking with all available bashes
Add tests to help catch bash4-isms and ensure syntax is checked with
 all bashes on PATH in a given system.
2017-02-10 18:58:36 -05:00
Izaak Beekman
7cf9ea708d Issue 44 issue 21 issue 47 (#85)
* Fix shifting over `--`: don't throw errexit

 Fixes #21

* Add error trapping (including Ctrl-C) info to FAQ

 Closes #47

* Add backtracing to help localize errors

 - Fixes #44
 - Backtracing is turned on when the debugging `-d` flag is passed,
   otherwise backtracing function defined but signal trap not set.
 - Update main-help fixture due to moving trap

* Untabify main.sh

 Might be a controversial move, but I loath tabs...

* Add checks for tab chars and trailing whitespace

 - Update poor-man's style enforcement script to check for these
   violations
 - Better document style guidlines in README with small tweaks

* Add a magic variable to indicate if being source

 if `__i_am_main_script=1 #true` then `main.sh` called directly
 Fixes #45
2017-02-10 15:03:07 +01:00
Manuel Streuhofer
47be547cfa extend acceptance test to check for code style (#81)
* extend acceptance test to check for code style

* cleanup following own style guide
2016-12-21 19:30:28 +01:00
Manuel Streuhofer
785e7e9f8b Cleanup all *.sh following shellcheck advice (#80)
* Cleanup all *.sh following shellcheck advice

Closes #79

* do not shellcheck scripts out of our control
2016-12-16 08:18:03 +01:00
Manuel Streuhofer
ce755604da run shellcheck as part of the acceptance test (#77)
* install shellcheck from debian sid repository

* cleanup acceptance shell script

use a uniq temp directory and cleanup
make sure commands we use/need are installed

* shellcheck main.sh

* shellcheck example.sh

* shellcheck test/acceptance.sh

* brace all variables, used [[ instead of [
2016-12-15 12:57:42 +01:00
Manuel Streuhofer
290c65d4b9 fix auto-color-off code
turn off colors if NO_COLOR is "true" or TERM is not "xterm*" or STDERR
is not connected to a terminal, but ignore TERM and STDERR if NO_COLOR
is set to "false" explicitly.

Fixes #69
2016-12-03 18:52:10 +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
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
6dc7e1f92a Don't use a subshell to handle diff failures. Refs #10 2016-02-23 10:16:58 +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
Kevin van Zonneveld
dd5950975d Fix popd 2016-02-16 20:25:30 +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