cleaned up bashisms
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
# do_task() { # accepts workflow name into $1 and all input into $2
|
||||
# # your actions here
|
||||
# }
|
||||
# run-task
|
||||
# run_task
|
||||
#
|
||||
# You can call different workflows from inside tasks by referring to
|
||||
# this very script using the $SFLIB environment variable or by calling
|
||||
@@ -39,7 +39,7 @@ debugout() { printf '%s\n' "$*" >&2; }
|
||||
flowout() { printf '%s\t%s' "$1" "$2"; }
|
||||
|
||||
# use this in all task definitions
|
||||
run-task() {
|
||||
run_task() {
|
||||
input="$(cat)"
|
||||
wf="$(printf '%s' "$input" | cut -f 1)"
|
||||
body="$(printf '%s' "$input" | cut -f 2-)"
|
||||
@@ -57,4 +57,4 @@ sfrun() {
|
||||
flowout $wfbase "$(cat)" | SFLIB="$SFLIB" WFDIR="$WFDIR" $SHELL $wfbase | cut -f 2-
|
||||
}
|
||||
|
||||
[ "$(basename "$0")" == "flow.sh" ] && sfrun $*
|
||||
[ "$(basename "$0")" = "flow.sh" ] && sfrun "$@"
|
||||
|
||||
Reference in New Issue
Block a user