fixing echoing bug
This commit is contained in:
4
bake
4
bake
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
## VERSION 22.6.8
|
## VERSION 22.6.10
|
||||||
## BASH-MAKE ==========================================================
|
## BASH-MAKE ==========================================================
|
||||||
## Utility to mimick some of GNU Make behavior, but run in a single
|
## Utility to mimick some of GNU Make behavior, but run in a single
|
||||||
## bash shell. This executable can be used as the Bakefile, too,
|
## bash shell. This executable can be used as the Bakefile, too,
|
||||||
@@ -124,7 +124,7 @@ _update_self() {
|
|||||||
chmod +x "$0"
|
chmod +x "$0"
|
||||||
echo Updated. >&2
|
echo Updated. >&2
|
||||||
}
|
}
|
||||||
@() { printf "\e[36m▶ $@\e[0m\n" >&2; "$@"; } # Print command before running it
|
@() { echo "▶ $@" >&2; "$@"; } # Print command before running it
|
||||||
|
|
||||||
for (( i=1; i<=$#; i++ )); do
|
for (( i=1; i<=$#; i++ )); do
|
||||||
if [[ $i -eq 1 ]]; then
|
if [[ $i -eq 1 ]]; then
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
BAKE=$( readlink -f ../bake )
|
BAKE=$( readlink -f ../bake )
|
||||||
internals() {
|
internals() {
|
||||||
_yecho "flines function"
|
_yecho "flines function"
|
||||||
_assert_eq "$( cd internals; $BAKE flines | wc -l )" "4"
|
_assert_eq "$( cd internals; $BAKE flines | wc -l )" "5"
|
||||||
_yecho "commands function"
|
_yecho "commands function"
|
||||||
_assert_eq "$( cd internals; $BAKE commands )" "^target1$|^target2$|^flines$|^commands$"
|
_assert_eq "$( cd internals; $BAKE commands )" "^target1$|^target2$|^flines$|^commands$|^echoing$"
|
||||||
_yecho "Not a target should fail"
|
_yecho "Not a target should fail"
|
||||||
( cd internals; $BAKE non-existent ) && { _fail; } || { _pass; }
|
( cd internals; $BAKE non-existent ) && { _fail; } || { _pass; }
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
target1() {
|
target1() {
|
||||||
@ echo 1
|
echo 1
|
||||||
}
|
}
|
||||||
target2() { # Target description
|
target2() { # Target description
|
||||||
# Sub help
|
# Sub help
|
||||||
@@ -15,3 +15,10 @@ flines() {
|
|||||||
commands() {
|
commands() {
|
||||||
_commands
|
_commands
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echoing() {
|
||||||
|
@ echo some command
|
||||||
|
@ echo escaped \
|
||||||
|
command \
|
||||||
|
follows
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user