Add ? to kickstart.debugging
This commit is contained in:
parent
9ee05e6933
commit
fd524e0116
@ -7,7 +7,7 @@
|
|||||||
* [kickstart.apt.ppa](kickstart/apt/ppa)
|
* [kickstart.apt.ppa](kickstart/apt/ppa)
|
||||||
* [kickstart.command_exists](kickstart/command_exists)
|
* [kickstart.command_exists](kickstart/command_exists)
|
||||||
* [kickstart.context](kickstart/context)
|
* [kickstart.context](kickstart/context)
|
||||||
* [kickstart.debugging](kickstart/debugging)
|
* [kickstart.debugging?](kickstart/debugging?)
|
||||||
* [kickstart.download.file](kickstart/download/file)
|
* [kickstart.download.file](kickstart/download/file)
|
||||||
* [kickstart.download.stream](kickstart/download/stream)
|
* [kickstart.download.stream](kickstart/download/stream)
|
||||||
* [kickstart.file.contains](kickstart/file/contains)
|
* [kickstart.file.contains](kickstart/file/contains)
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
# kickstart.debugging
|
# kickstart.debugging?
|
||||||
|
|
||||||
Returns 0 if you are debugging, and 1 if not
|
Returns 0 if you are debugging, and 1 if not
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ kickstart.debugging || echo nope
|
$ kickstart.debugging? || echo nope
|
||||||
nope
|
nope
|
||||||
|
|
||||||
$ set -x; kickstart.debugging && echo yup; set +x;
|
$ set -x; kickstart.debugging? && echo yup; set +x;
|
||||||
+ kickstart.debugging
|
+ kickstart.debugging?
|
||||||
+ grep xtrace
|
+ grep xtrace
|
||||||
+ kickstart.stream.contains on
|
+ kickstart.stream.contains on
|
||||||
+ grep -q on
|
+ grep -q on
|
@ -8,13 +8,13 @@ kickstart.context() {
|
|||||||
kickstart_context="$@"
|
kickstart_context="$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
kickstart.debugging() {
|
kickstart.debugging?() {
|
||||||
set -o | grep xtrace | kickstart.stream.contains on
|
set -o | grep xtrace | kickstart.stream.contains on
|
||||||
}
|
}
|
||||||
|
|
||||||
kickstart.mute() {
|
kickstart.mute() {
|
||||||
kickstart.info "Running \"$@\""
|
kickstart.info "Running \"$@\""
|
||||||
if kickstart.debugging; then
|
if kickstart.debugging?; then
|
||||||
"$@"
|
"$@"
|
||||||
else
|
else
|
||||||
`"$@" >/dev/null 2>&1`
|
`"$@" >/dev/null 2>&1`
|
||||||
|
Loading…
Reference in New Issue
Block a user