From e74984a6cb45112e7e0542a929af0d5cc0eefafd Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 25 Aug 2024 14:59:50 +0200 Subject: [PATCH] functions/step --- spcd/main.sh | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/spcd/main.sh b/spcd/main.sh index 5f7208d..d77913f 100644 --- a/spcd/main.sh +++ b/spcd/main.sh @@ -866,6 +866,23 @@ ${SPCD_PYTHON_ALIAS} / ${spcd_stp__name}" "${SPCD_PYTHON_ALIAS}" -m "${spcd_stp__name}" } +# ╭───────────┬──────╮ +# │ functions │ step │ +# ╰───────────┴──────╯ + +spcd_step() { + SPCD_STEP=$((SPCD_STEP + 1)) + SPCD_STEP_TEXT="${*}" + unset SPCD_SUBSTEP SPCD_SUBSTEP_TEXT + spcd_banner +} + +spcd_substep() { + SPCD_SUBSTEP=$((SPCD_SUBSTEP + 1)) + SPCD_SUBSTEP_TEXT="${*}" + spcd_banner +} + # ╭───────────╮ # │ functions │ # ╰───────────╯ @@ -1016,19 +1033,6 @@ spcd_split() { echo "${SPCD_SPLT}" } -spcd_step() { - SPCD_STEP=$((SPCD_STEP + 1)) - SPCD_STEP_TEXT="${*}" - unset SPCD_SUBSTEP SPCD_SUBSTEP_TEXT - spcd_banner -} - -spcd_substep() { - SPCD_SUBSTEP=$((SPCD_SUBSTEP + 1)) - SPCD_SUBSTEP_TEXT="${*}" - spcd_banner -} - spcd_write() { spcd_write__file="${1}" spcd_write__text="${2}" @@ -1097,7 +1101,6 @@ spcd_fill() { # │ internal │ banner │ # ╰──────────┴────────╯ -SPCD_BANNER=1 SPCD_BANNER_DOWN_AND_HORIZONTAL="┬" SPCD_BANNER_DOWN_AND_LEFT="╮" SPCD_BANNER_DOWN_AND_RIGHT="╭" @@ -1184,8 +1187,14 @@ spcd_banner_unset() { unset SPCD_BANNER_TOP SPCD_BANNER_MIDDLE SPCD_BANNER_BOTTOM } -# ╭──────────┬─────╮ -# │ internal │ run │ -# ╰──────────┴─────╯ +# ╭──────────┬──────╮ +# │ internal │ step │ +# ╰──────────┴──────╯ + +SPCD_STEP=1 + +# ╭──────────╮ +# │ internal │ +# ╰──────────╯ spcd_main