cleaned up bashisms

This commit is contained in:
Luxferre
2026-07-27 20:33:44 +03:00
parent 3c952b7631
commit 9775b3edc4
9 changed files with 46 additions and 46 deletions
+3 -3
View File
@@ -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 "$@"