From a83a12858713acb556b56e128ecda9cdb09676bf Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 14:02:45 +0200 Subject: [PATCH 01/33] =?UTF-8?q?=E2=86=95/=E2=86=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spcd/bootstrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index db3dcb3..6936a8e 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -122,8 +122,8 @@ spcd_banner_open() { spcd_banner_render() { spcd_banner_unset - spcd_banner_add_index spcd_banner_add "S" + spcd_banner_add_index # unset spcd_br__level while true; do From 0dd882da0d100bb75bddcc49c2cb339fa9425b0a Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 14:07:01 +0200 Subject: [PATCH 02/33] frame/top,bottom --- readme.md | 5 +---- spcd/bootstrap.sh | 8 ++++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/readme.md b/readme.md index 8bb324b..559e788 100644 --- a/readme.md +++ b/readme.md @@ -213,11 +213,8 @@ Handle project workflows in a unified way: ### Shell -* banner - * constants for characters - * dynamic substeps * comment -* frame corners +* drawing characters constants * packages * configure * apk diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 6936a8e..d78577b 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -163,15 +163,15 @@ SPCD_ERROR_OS=2 # │ internal │ frame │ # ╰──────────┴───────╯ -SPCD_FRAME_DOWN_AND_RIGHT="╭" -SPCD_FRAME_UP_AND_RIGHT="╰" +SPCD_FRAME_TOP="╭╴" +SPCD_FRAME_BOTTOM="╰╴" spcd_frame_open() { - echo "${SPCD_FRAME_DOWN_AND_RIGHT}${1}" + echo "${SPCD_FRAME_TOP}${1}" } spcd_frame_shut() { - echo "${SPCD_FRAME_UP_AND_RIGHT}${1}" + echo "${SPCD_FRAME_BOTTOM}${1}" } # ╭──────────┬────╮ From 3d64af5378807bd49346ff933ebf49645eb69492 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 14:19:59 +0200 Subject: [PATCH 03/33] _/frame --- spcd/bootstrap.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index d78577b..f55eae8 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -163,15 +163,15 @@ SPCD_ERROR_OS=2 # │ internal │ frame │ # ╰──────────┴───────╯ -SPCD_FRAME_TOP="╭╴" -SPCD_FRAME_BOTTOM="╰╴" +_SPCD_FRAME_TOP="╭╴" +_SPCD_FRAME_BOTTOM="╰╴" -spcd_frame_open() { - echo "${SPCD_FRAME_TOP}${1}" +_spcd_frame_open() { + echo "${_SPCD_FRAME_TOP}${1}" } -spcd_frame_shut() { - echo "${SPCD_FRAME_BOTTOM}${1}" +_spcd_frame_shut() { + echo "${_SPCD_FRAME_BOTTOM}${1}" } # ╭──────────┬────╮ @@ -181,9 +181,9 @@ spcd_frame_shut() { spcd_os_cat() { spcd_cat__file="${1}" if [ -n "${spcd_cat__file}" ]; then - spcd_frame_open "${spcd_cat__file}" + _spcd_frame_open "${spcd_cat__file}" cat "${spcd_cat__file}" - spcd_frame_shut "${spcd_cat__file}" + _spcd_frame_shut "${spcd_cat__file}" fi } @@ -277,9 +277,9 @@ spcd_os_grep() { spcd_os_ls() { spcd_os_ls__path="${1}" if [ -n "${spcd_os_ls__path}" ]; then - spcd_frame_open "${spcd_os_ls__path}" + _spcd_frame_open "${spcd_os_ls__path}" ls -a -l "${spcd_os_ls__path}" - spcd_frame_shut "${spcd_os_ls__path}" + _spcd_frame_shut "${spcd_os_ls__path}" fi } From e6dcf636317853b58d68844484c0b6078c826bff Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 14:22:25 +0200 Subject: [PATCH 04/33] _/cat --- spcd/bootstrap.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index f55eae8..7261dfc 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -178,7 +178,7 @@ _spcd_frame_shut() { # │ internal │ os │ # ╰──────────┴────╯ -spcd_os_cat() { +_spcd_os_cat() { spcd_cat__file="${1}" if [ -n "${spcd_cat__file}" ]; then _spcd_frame_open "${spcd_cat__file}" @@ -313,10 +313,10 @@ spcd_os_sed() { spcd_os_sed__file="${1}" shift if [ -f "${spcd_os_sed__file}" ]; then - spcd_os_cat "${spcd_os_sed__file}" + _spcd_os_cat "${spcd_os_sed__file}" for spcd_os_sed__regex in "${@}"; do sed --in-place "s${spcd_os_sed__regex}g" "${spcd_os_sed__file}" && - spcd_os_cat "${spcd_os_sed__file}" + _spcd_os_cat "${spcd_os_sed__file}" done fi } @@ -326,10 +326,10 @@ spcd_os_write() { spcd_os_write__text="${2}" if [ -n "${spcd_os_write__file}" ]; then [ -f "${spcd_os_write__file}" ] && - spcd_os_cat "${spcd_os_write__file}" + _spcd_os_cat "${spcd_os_write__file}" echo "→ ${spcd_os_write__file}" printf "%s" "${spcd_os_write__text}" >"${spcd_os_write__file}" - spcd_os_cat "${spcd_os_write__file}" + _spcd_os_cat "${spcd_os_write__file}" fi } From 34222be571f3c17a36527c0f3e2d50ba9826b372 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 14:23:48 +0200 Subject: [PATCH 05/33] _/rule --- spcd/bootstrap.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 7261dfc..2af2a39 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -191,9 +191,9 @@ _spcd_os_cat() { # │ internal │ rule │ # ╰──────────┴──────╯ -SPCD_RULE_HORIZONTAL="─" -SPCD_RULE_LEFT="╴" -SPCD_RULE_RIGHT="╶" +_SPCD_RULE_HORIZONTAL="─" +_SPCD_RULE_LEFT="╴" +_SPCD_RULE_RIGHT="╶" # ╭──────────┬──────╮ # │ internal │ step │ @@ -362,7 +362,7 @@ spcd_python_pip() { # ╰───────────┴───────╯ spcd_split() { - echo "${SPCD_RULE_RIGHT}${SPCD_RULE_HORIZONTAL}${SPCD_RULE_LEFT}" + echo "${_SPCD_RULE_RIGHT}${_SPCD_RULE_HORIZONTAL}${_SPCD_RULE_LEFT}" } # ╭───────────┬──────╮ From 54cbb5954227eb18e2a30860bf0dc2cb78a58d1e Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 14:25:48 +0200 Subject: [PATCH 06/33] rule/rename --- spcd/bootstrap.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 2af2a39..ebc7ac9 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -191,9 +191,9 @@ _spcd_os_cat() { # │ internal │ rule │ # ╰──────────┴──────╯ -_SPCD_RULE_HORIZONTAL="─" -_SPCD_RULE_LEFT="╴" -_SPCD_RULE_RIGHT="╶" +_SPCD_RULE_LEFT="╶" +_SPCD_RULE_MIDDLE="─" +_SPCD_RULE_RIGHT="╴" # ╭──────────┬──────╮ # │ internal │ step │ @@ -362,7 +362,7 @@ spcd_python_pip() { # ╰───────────┴───────╯ spcd_split() { - echo "${_SPCD_RULE_RIGHT}${_SPCD_RULE_HORIZONTAL}${_SPCD_RULE_LEFT}" + echo "${_SPCD_RULE_LEFT}${_SPCD_RULE_MIDDLE}${_SPCD_RULE_RIGHT}" } # ╭───────────┬──────╮ From 95a1c81f39e5ab4265cd1f71793a7e07cfa8c35c Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 14:33:12 +0200 Subject: [PATCH 07/33] _/level --- spcd/bootstrap.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index ebc7ac9..9521e7a 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -199,12 +199,12 @@ _SPCD_RULE_RIGHT="╴" # │ internal │ step │ # ╰──────────┴──────╯ -SPCD_STEP_LEVEL=1 +_SPCD_STEP_LEVEL=1 spcd_step_wipe() { unset \ - "SPCD_STEP_${SPCD_STEP_LEVEL}_INDEX" \ - "SPCD_STEP_${SPCD_STEP_LEVEL}_LABEL" + "SPCD_STEP_${_SPCD_STEP_LEVEL}_INDEX" \ + "SPCD_STEP_${_SPCD_STEP_LEVEL}_LABEL" } #╶──────────────────────────────────────╴ @@ -371,7 +371,7 @@ spcd_split() { spcd_step() { if [ -n "${1}" ]; then - spcd_step__prefix="SPCD_STEP_${SPCD_STEP_LEVEL}" + spcd_step__prefix="SPCD_STEP_${_SPCD_STEP_LEVEL}" spcd_step__index="${spcd_step__prefix}_INDEX" eval "${spcd_step__index}=\$((${spcd_step__index} + 1))" eval "${spcd_step__prefix}_LABEL=\"${1}\"" @@ -381,13 +381,13 @@ spcd_step() { spcd_step_in() { [ -n "${1}" ] && spcd_step "${1}" - SPCD_STEP_LEVEL=$((SPCD_STEP_LEVEL + 1)) + _SPCD_STEP_LEVEL=$((_SPCD_STEP_LEVEL + 1)) spcd_step_wipe } spcd_step_out() { spcd_step_wipe - SPCD_STEP_LEVEL=$((SPCD_STEP_LEVEL - 1)) + _SPCD_STEP_LEVEL=$((_SPCD_STEP_LEVEL - 1)) } #╶──────────────────────────────────────╴ From 04a6a0c15e825c1bb55b4ead928944438b7a7e81 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 14:34:01 +0200 Subject: [PATCH 08/33] _/wipe --- spcd/bootstrap.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 9521e7a..1a945bd 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -201,7 +201,7 @@ _SPCD_RULE_RIGHT="╴" _SPCD_STEP_LEVEL=1 -spcd_step_wipe() { +_spcd_step_wipe() { unset \ "SPCD_STEP_${_SPCD_STEP_LEVEL}_INDEX" \ "SPCD_STEP_${_SPCD_STEP_LEVEL}_LABEL" @@ -382,11 +382,11 @@ spcd_step() { spcd_step_in() { [ -n "${1}" ] && spcd_step "${1}" _SPCD_STEP_LEVEL=$((_SPCD_STEP_LEVEL + 1)) - spcd_step_wipe + _spcd_step_wipe } spcd_step_out() { - spcd_step_wipe + _spcd_step_wipe _SPCD_STEP_LEVEL=$((_SPCD_STEP_LEVEL - 1)) } From f5402050c084d2d5e1b51a41caa474d3cd19fde1 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 14:37:50 +0200 Subject: [PATCH 09/33] =?UTF-8?q?=E2=88=92rules?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spcd/bootstrap.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 1a945bd..c1aee37 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -31,8 +31,6 @@ [ -n "${SPCD_URL_UBUNTU}" ] || SPCD_URL_UBUNTU="https://ubuntu.mirrors.ovh.net" -#╶──────────────────────────────────────╴ - # ╭──────────╮ # │ internal │ # ╰──────────╯ @@ -207,7 +205,9 @@ _spcd_step_wipe() { "SPCD_STEP_${_SPCD_STEP_LEVEL}_LABEL" } -#╶──────────────────────────────────────╴ +# ╭───────────╮ +# │ functions │ +# ╰───────────╯ # ╭───────────┬───────╮ # │ functions │ error │ @@ -390,7 +390,9 @@ spcd_step_out() { _SPCD_STEP_LEVEL=$((_SPCD_STEP_LEVEL - 1)) } -#╶──────────────────────────────────────╴ +# ╭───────╮ +# │ steps │ +# ╰───────╯ # ╭───────┬───────────╮ # │ steps │ constants │ @@ -1228,8 +1230,6 @@ ${SPCD_PYTHON_ALIAS} / ${spcd_stp__name}" "${SPCD_PYTHON_ALIAS}" -m "${spcd_stp__name}" } -#╶──────────────────────────────────────╴ - # ╭──────╮ # │ main │ # ╰──────╯ From bf680b6fda6a068cc60478a1acdef999d095be2b Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 14:39:29 +0200 Subject: [PATCH 10/33] internals --- spcd/bootstrap.sh | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index c1aee37..511c8fc 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -31,9 +31,9 @@ [ -n "${SPCD_URL_UBUNTU}" ] || SPCD_URL_UBUNTU="https://ubuntu.mirrors.ovh.net" -# ╭──────────╮ -# │ internal │ -# ╰──────────╯ +# ╭───────────╮ +# │ internals │ +# ╰───────────╯ spcd_fill() { spcd_fill__index=${1} @@ -43,9 +43,9 @@ spcd_fill() { done } -# ╭──────────┬────────╮ -# │ internal │ banner │ -# ╰──────────┴────────╯ +# ╭───────────┬────────╮ +# │ internals │ banner │ +# ╰───────────┴────────╯ SPCD_BANNER_DOWN_AND_HORIZONTAL="┬" SPCD_BANNER_DOWN_AND_LEFT="╮" @@ -150,16 +150,16 @@ spcd_banner_unset() { SPCD_BANNER_BOTTOM } -# ╭──────────┬───────╮ -# │ internal │ error │ -# ╰──────────┴───────╯ +# ╭───────────┬───────╮ +# │ internals │ error │ +# ╰───────────┴───────╯ SPCD_ERROR_CI=1 SPCD_ERROR_OS=2 -# ╭──────────┬───────╮ -# │ internal │ frame │ -# ╰──────────┴───────╯ +# ╭───────────┬───────╮ +# │ internals │ frame │ +# ╰───────────┴───────╯ _SPCD_FRAME_TOP="╭╴" _SPCD_FRAME_BOTTOM="╰╴" @@ -172,9 +172,9 @@ _spcd_frame_shut() { echo "${_SPCD_FRAME_BOTTOM}${1}" } -# ╭──────────┬────╮ -# │ internal │ os │ -# ╰──────────┴────╯ +# ╭───────────┬────╮ +# │ internals │ os │ +# ╰───────────┴────╯ _spcd_os_cat() { spcd_cat__file="${1}" @@ -185,17 +185,17 @@ _spcd_os_cat() { fi } -# ╭──────────┬──────╮ -# │ internal │ rule │ -# ╰──────────┴──────╯ +# ╭───────────┬──────╮ +# │ internals │ rule │ +# ╰───────────┴──────╯ _SPCD_RULE_LEFT="╶" _SPCD_RULE_MIDDLE="─" _SPCD_RULE_RIGHT="╴" -# ╭──────────┬──────╮ -# │ internal │ step │ -# ╰──────────┴──────╯ +# ╭───────────┬──────╮ +# │ internals │ step │ +# ╰───────────┴──────╯ _SPCD_STEP_LEVEL=1 From ceeb7337a2013204cfd5dd089808d48a22f4789c Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 14:42:24 +0200 Subject: [PATCH 11/33] defaults --- spcd/bootstrap.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 511c8fc..08f8edc 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -5,13 +5,17 @@ # ╰──────────╯ [ -n "${SPCD_CMD_SUM}" ] || SPCD_CMD_SUM="sha512sum" + [ -n "${SPCD_DNS_1}" ] || SPCD_DNS_1="9.9.9.9" + [ -n "${SPCD_GIT_MAIN}" ] || SPCD_GIT_MAIN="spcd" [ -n "${SPCD_GIT_ROOT}" ] || SPCD_GIT_ROOT="rwx" [ -n "${SPCD_GIT_SHUNIT}" ] || SPCD_GIT_SHUNIT="shunit2" + [ -n "${SPCD_REF_FEATURE}" ] || SPCD_REF_FEATURE="f" [ -n "${SPCD_REF_RELEASE}" ] || SPCD_REF_RELEASE="main" [ -n "${SPCD_REF_STAGING}" ] || SPCD_REF_STAGING="dev" + [ -n "${SPCD_URL_ALPINE}" ] || SPCD_URL_ALPINE="https://dl-cdn.alpinelinux.org" [ -n "${SPCD_URL_ARCH}" ] || From 535d3479a673d6d5a392663136c8e92c96543e95 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 14:47:50 +0200 Subject: [PATCH 12/33] _/fill --- spcd/bootstrap.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 08f8edc..223a224 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -10,6 +10,7 @@ [ -n "${SPCD_GIT_MAIN}" ] || SPCD_GIT_MAIN="spcd" [ -n "${SPCD_GIT_ROOT}" ] || SPCD_GIT_ROOT="rwx" + [ -n "${SPCD_GIT_SHUNIT}" ] || SPCD_GIT_SHUNIT="shunit2" [ -n "${SPCD_REF_FEATURE}" ] || SPCD_REF_FEATURE="f" @@ -39,11 +40,11 @@ # │ internals │ # ╰───────────╯ -spcd_fill() { - spcd_fill__index=${1} - while [ "${spcd_fill__index}" -gt 0 ]; do +_spcd_fill() { + _spcd_fill__index=${1} + while [ "${_spcd_fill__index}" -gt 0 ]; do printf "%s" "${2}" - spcd_fill__index=$((spcd_fill__index - 1)) + _spcd_fill__index=$((_spcd_fill__index - 1)) done } @@ -65,7 +66,7 @@ spcd_banner_add() { spcd_ba__text=" ${1} " spcd_ba__length=${#spcd_ba__text} spcd_ba__filler="$( - spcd_fill "${spcd_ba__length}" "${SPCD_BANNER_HORIZONTAL}" + _spcd_fill "${spcd_ba__length}" "${SPCD_BANNER_HORIZONTAL}" )" if [ -n "${SPCD_BANNER_MIDDLE}" ]; then spcd_banner_split From 3305069feafd389b7867ba8a8528661826b6de54 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 14:48:36 +0200 Subject: [PATCH 13/33] unset --- spcd/bootstrap.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 223a224..366f599 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -46,6 +46,7 @@ _spcd_fill() { printf "%s" "${2}" _spcd_fill__index=$((_spcd_fill__index - 1)) done + unset _spcd_fill__index } # ╭───────────┬────────╮ From edfe4dd55a4c04b5e6bc9a46db19814e2be96517 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 14:51:20 +0200 Subject: [PATCH 14/33] _/add --- spcd/bootstrap.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 366f599..67bd47d 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -62,7 +62,7 @@ SPCD_BANNER_UP_AND_LEFT="╯" SPCD_BANNER_UP_AND_RIGHT="╰" SPCD_BANNER_VERTICAL="│" -spcd_banner_add() { +_spcd_banner_add() { if [ -n "${1}" ]; then spcd_ba__text=" ${1} " spcd_ba__length=${#spcd_ba__text} @@ -92,7 +92,7 @@ spcd_banner_add_index() { spcd_bai__label="${spcd_bai__value}" fi done - spcd_banner_add "${spcd_bai__label}" + _spcd_banner_add "${spcd_bai__label}" } spcd_banner_append() { @@ -126,7 +126,7 @@ spcd_banner_open() { spcd_banner_render() { spcd_banner_unset - spcd_banner_add "S" + _spcd_banner_add "S" spcd_banner_add_index # unset spcd_br__level @@ -134,7 +134,7 @@ spcd_banner_render() { spcd_br__level=$((spcd_br__level + 1)) eval "spcd_br__value=\"\${SPCD_STEP_${spcd_br__level}_LABEL}\"" [ -n "${spcd_br__value}" ] || break - spcd_banner_add "${spcd_br__value}" + _spcd_banner_add "${spcd_br__value}" done # spcd_banner_close From 060f5f5f5b24cf0788504187d024b278622aa3c2 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 14:56:40 +0200 Subject: [PATCH 15/33] _/add_index --- spcd/bootstrap.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 67bd47d..f968841 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -79,7 +79,7 @@ _spcd_banner_add() { fi } -spcd_banner_add_index() { +_spcd_banner_add_index() { unset spcd_bai__label unset spcd_bai__level while true; do @@ -127,7 +127,7 @@ spcd_banner_open() { spcd_banner_render() { spcd_banner_unset _spcd_banner_add "S" - spcd_banner_add_index + _spcd_banner_add_index # unset spcd_br__level while true; do From 33480c3702796e09cb9100bb034ca50e62a7706c Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 14:58:34 +0200 Subject: [PATCH 16/33] _/append --- spcd/bootstrap.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index f968841..6189b29 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -74,7 +74,7 @@ _spcd_banner_add() { else spcd_banner_open fi - spcd_banner_append \ + _spcd_banner_append \ "${spcd_ba__filler}" "${spcd_ba__text}" "${spcd_ba__filler}" fi } @@ -95,7 +95,7 @@ _spcd_banner_add_index() { _spcd_banner_add "${spcd_bai__label}" } -spcd_banner_append() { +_spcd_banner_append() { if [ -n "${3}" ]; then SPCD_BANNER_TOP="${SPCD_BANNER_TOP}${1}" SPCD_BANNER_MIDDLE="${SPCD_BANNER_MIDDLE}${2}" @@ -104,7 +104,7 @@ spcd_banner_append() { } spcd_banner_close() { - spcd_banner_append \ + _spcd_banner_append \ "${SPCD_BANNER_DOWN_AND_LEFT}" \ "${SPCD_BANNER_VERTICAL}" \ "${SPCD_BANNER_UP_AND_LEFT}" @@ -118,7 +118,7 @@ ${SPCD_BANNER_BOTTOM}" } spcd_banner_open() { - spcd_banner_append \ + _spcd_banner_append \ "${SPCD_BANNER_DOWN_AND_RIGHT}" \ "${SPCD_BANNER_VERTICAL}" \ "${SPCD_BANNER_UP_AND_RIGHT}" @@ -143,7 +143,7 @@ spcd_banner_render() { } spcd_banner_split() { - spcd_banner_append \ + _spcd_banner_append \ "${SPCD_BANNER_DOWN_AND_HORIZONTAL}" \ "${SPCD_BANNER_VERTICAL}" \ "${SPCD_BANNER_UP_AND_HORIZONTAL}" From 544e53c301c77f39122711974b922d999f346522 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 14:59:46 +0200 Subject: [PATCH 17/33] _/shut --- spcd/bootstrap.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 6189b29..9c0bed1 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -103,7 +103,7 @@ _spcd_banner_append() { fi } -spcd_banner_close() { +_spcd_banner_shut() { _spcd_banner_append \ "${SPCD_BANNER_DOWN_AND_LEFT}" \ "${SPCD_BANNER_VERTICAL}" \ @@ -137,7 +137,7 @@ spcd_banner_render() { _spcd_banner_add "${spcd_br__value}" done # - spcd_banner_close + _spcd_banner_shut spcd_banner_echo spcd_banner_unset } From 24fc9ca0440d37329f23e24bdc1ccb7accd2b4e1 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 15:00:11 +0200 Subject: [PATCH 18/33] mv --- spcd/bootstrap.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 9c0bed1..96dce3a 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -103,13 +103,6 @@ _spcd_banner_append() { fi } -_spcd_banner_shut() { - _spcd_banner_append \ - "${SPCD_BANNER_DOWN_AND_LEFT}" \ - "${SPCD_BANNER_VERTICAL}" \ - "${SPCD_BANNER_UP_AND_LEFT}" -} - spcd_banner_echo() { echo "\ ${SPCD_BANNER_TOP} @@ -142,6 +135,13 @@ spcd_banner_render() { spcd_banner_unset } +_spcd_banner_shut() { + _spcd_banner_append \ + "${SPCD_BANNER_DOWN_AND_LEFT}" \ + "${SPCD_BANNER_VERTICAL}" \ + "${SPCD_BANNER_UP_AND_LEFT}" +} + spcd_banner_split() { _spcd_banner_append \ "${SPCD_BANNER_DOWN_AND_HORIZONTAL}" \ From 54d86066e898caa55bfe28b34409c9986be9b98e Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 15:01:45 +0200 Subject: [PATCH 19/33] _/split --- spcd/bootstrap.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 96dce3a..0ba63c6 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -70,7 +70,7 @@ _spcd_banner_add() { _spcd_fill "${spcd_ba__length}" "${SPCD_BANNER_HORIZONTAL}" )" if [ -n "${SPCD_BANNER_MIDDLE}" ]; then - spcd_banner_split + _spcd_banner_split else spcd_banner_open fi @@ -142,7 +142,7 @@ _spcd_banner_shut() { "${SPCD_BANNER_UP_AND_LEFT}" } -spcd_banner_split() { +_spcd_banner_split() { _spcd_banner_append \ "${SPCD_BANNER_DOWN_AND_HORIZONTAL}" \ "${SPCD_BANNER_VERTICAL}" \ From eee9247959ac26ecf5e7092e99f692ec0dc13c98 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 15:04:38 +0200 Subject: [PATCH 20/33] _/unset --- spcd/bootstrap.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 0ba63c6..fef9e79 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -118,7 +118,7 @@ spcd_banner_open() { } spcd_banner_render() { - spcd_banner_unset + _spcd_banner_unset _spcd_banner_add "S" _spcd_banner_add_index # @@ -132,7 +132,7 @@ spcd_banner_render() { # _spcd_banner_shut spcd_banner_echo - spcd_banner_unset + _spcd_banner_unset } _spcd_banner_shut() { @@ -149,7 +149,7 @@ _spcd_banner_split() { "${SPCD_BANNER_UP_AND_HORIZONTAL}" } -spcd_banner_unset() { +_spcd_banner_unset() { unset \ SPCD_BANNER_TOP \ SPCD_BANNER_MIDDLE \ From 70537dde1392a8c28936fd2ca927166eeed71efe Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 15:07:53 +0200 Subject: [PATCH 21/33] _/open --- spcd/bootstrap.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index fef9e79..2aaf7b2 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -72,7 +72,7 @@ _spcd_banner_add() { if [ -n "${SPCD_BANNER_MIDDLE}" ]; then _spcd_banner_split else - spcd_banner_open + _spcd_banner_open fi _spcd_banner_append \ "${spcd_ba__filler}" "${spcd_ba__text}" "${spcd_ba__filler}" @@ -110,7 +110,7 @@ ${SPCD_BANNER_MIDDLE} ${SPCD_BANNER_BOTTOM}" } -spcd_banner_open() { +_spcd_banner_open() { _spcd_banner_append \ "${SPCD_BANNER_DOWN_AND_RIGHT}" \ "${SPCD_BANNER_VERTICAL}" \ From 9e059a986b4b7437b4d49da941e802ddafd64a2c Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 15:09:16 +0200 Subject: [PATCH 22/33] _/echo --- spcd/bootstrap.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 2aaf7b2..6fd1621 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -103,7 +103,7 @@ _spcd_banner_append() { fi } -spcd_banner_echo() { +_spcd_banner_echo() { echo "\ ${SPCD_BANNER_TOP} ${SPCD_BANNER_MIDDLE} @@ -131,7 +131,7 @@ spcd_banner_render() { done # _spcd_banner_shut - spcd_banner_echo + _spcd_banner_echo _spcd_banner_unset } From 068e1153ac0ca2c1ce1cdc45ef3f863ec682649d Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 15:13:28 +0200 Subject: [PATCH 23/33] _/render --- spcd/bootstrap.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 6fd1621..9a3b586 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -117,7 +117,7 @@ _spcd_banner_open() { "${SPCD_BANNER_UP_AND_RIGHT}" } -spcd_banner_render() { +_spcd_banner_render() { _spcd_banner_unset _spcd_banner_add "S" _spcd_banner_add_index @@ -381,7 +381,7 @@ spcd_step() { spcd_step__index="${spcd_step__prefix}_INDEX" eval "${spcd_step__index}=\$((${spcd_step__index} + 1))" eval "${spcd_step__prefix}_LABEL=\"${1}\"" - spcd_banner_render + _spcd_banner_render fi } From ea06b2f3ff50c52fe01cc3450d0bc9dd0e9233c9 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 15:17:58 +0200 Subject: [PATCH 24/33] wipe --- spcd/bootstrap.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 9a3b586..9933a3a 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -118,7 +118,7 @@ _spcd_banner_open() { } _spcd_banner_render() { - _spcd_banner_unset + _spcd_banner_wipe _spcd_banner_add "S" _spcd_banner_add_index # @@ -132,7 +132,7 @@ _spcd_banner_render() { # _spcd_banner_shut _spcd_banner_echo - _spcd_banner_unset + _spcd_banner_wipe } _spcd_banner_shut() { @@ -149,7 +149,7 @@ _spcd_banner_split() { "${SPCD_BANNER_UP_AND_HORIZONTAL}" } -_spcd_banner_unset() { +_spcd_banner_wipe() { unset \ SPCD_BANNER_TOP \ SPCD_BANNER_MIDDLE \ From 82468ed3743296e4cc8ad26f5146a476b15c76c1 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 15:19:31 +0200 Subject: [PATCH 25/33] _/ci --- spcd/bootstrap.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 9933a3a..a886db4 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -160,7 +160,7 @@ _spcd_banner_wipe() { # │ internals │ error │ # ╰───────────┴───────╯ -SPCD_ERROR_CI=1 +_SPCD_ERROR_CI=1 SPCD_ERROR_OS=2 # ╭───────────┬───────╮ @@ -221,7 +221,7 @@ _spcd_step_wipe() { spcd_error_ci() { echo "× CI: ${*}" - exit "${SPCD_ERROR_CI}" + exit "${_SPCD_ERROR_CI}" } spcd_error_os() { From a3b2abb004ff7d8f449803e7273ea89adb05f033 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 15:20:30 +0200 Subject: [PATCH 26/33] _/os --- spcd/bootstrap.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index a886db4..26bfeed 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -161,7 +161,7 @@ _spcd_banner_wipe() { # ╰───────────┴───────╯ _SPCD_ERROR_CI=1 -SPCD_ERROR_OS=2 +_SPCD_ERROR_OS=2 # ╭───────────┬───────╮ # │ internals │ frame │ @@ -228,7 +228,7 @@ spcd_error_os() { spcd_error_os__variable="${1}" printf "× OS: " spcd_os_printenv "${spcd_error_os__variable}" - exit "${SPCD_ERROR_OS}" + exit "${_SPCD_ERROR_OS}" } # ╭───────────┬─────╮ From 008312a3222513b4c18b56c94d78964d350b0b91 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 15:59:25 +0200 Subject: [PATCH 27/33] cat/1 --- spcd/bootstrap.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 26bfeed..88c1dfa 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -183,11 +183,10 @@ _spcd_frame_shut() { # ╰───────────┴────╯ _spcd_os_cat() { - spcd_cat__file="${1}" - if [ -n "${spcd_cat__file}" ]; then - _spcd_frame_open "${spcd_cat__file}" - cat "${spcd_cat__file}" - _spcd_frame_shut "${spcd_cat__file}" + if [ -n "${1}" ]; then + _spcd_frame_open "${1}" + cat "${1}" + _spcd_frame_shut "${1}" fi } From c823709b4f31b079549b64febf7338cf224a1edb Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 16:06:14 +0200 Subject: [PATCH 28/33] _/banner --- spcd/bootstrap.sh | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 88c1dfa..2edd1c7 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -53,21 +53,21 @@ _spcd_fill() { # │ internals │ banner │ # ╰───────────┴────────╯ -SPCD_BANNER_DOWN_AND_HORIZONTAL="┬" -SPCD_BANNER_DOWN_AND_LEFT="╮" -SPCD_BANNER_DOWN_AND_RIGHT="╭" -SPCD_BANNER_HORIZONTAL="─" -SPCD_BANNER_UP_AND_HORIZONTAL="┴" -SPCD_BANNER_UP_AND_LEFT="╯" -SPCD_BANNER_UP_AND_RIGHT="╰" -SPCD_BANNER_VERTICAL="│" +_SPCD_BANNER_DOWN_AND_HORIZONTAL="┬" +_SPCD_BANNER_DOWN_AND_LEFT="╮" +_SPCD_BANNER_DOWN_AND_RIGHT="╭" +_SPCD_BANNER_HORIZONTAL="─" +_SPCD_BANNER_UP_AND_HORIZONTAL="┴" +_SPCD_BANNER_UP_AND_LEFT="╯" +_SPCD_BANNER_UP_AND_RIGHT="╰" +_SPCD_BANNER_VERTICAL="│" _spcd_banner_add() { if [ -n "${1}" ]; then spcd_ba__text=" ${1} " spcd_ba__length=${#spcd_ba__text} spcd_ba__filler="$( - _spcd_fill "${spcd_ba__length}" "${SPCD_BANNER_HORIZONTAL}" + _spcd_fill "${spcd_ba__length}" "${_SPCD_BANNER_HORIZONTAL}" )" if [ -n "${SPCD_BANNER_MIDDLE}" ]; then _spcd_banner_split @@ -112,9 +112,9 @@ ${SPCD_BANNER_BOTTOM}" _spcd_banner_open() { _spcd_banner_append \ - "${SPCD_BANNER_DOWN_AND_RIGHT}" \ - "${SPCD_BANNER_VERTICAL}" \ - "${SPCD_BANNER_UP_AND_RIGHT}" + "${_SPCD_BANNER_DOWN_AND_RIGHT}" \ + "${_SPCD_BANNER_VERTICAL}" \ + "${_SPCD_BANNER_UP_AND_RIGHT}" } _spcd_banner_render() { @@ -137,16 +137,16 @@ _spcd_banner_render() { _spcd_banner_shut() { _spcd_banner_append \ - "${SPCD_BANNER_DOWN_AND_LEFT}" \ - "${SPCD_BANNER_VERTICAL}" \ - "${SPCD_BANNER_UP_AND_LEFT}" + "${_SPCD_BANNER_DOWN_AND_LEFT}" \ + "${_SPCD_BANNER_VERTICAL}" \ + "${_SPCD_BANNER_UP_AND_LEFT}" } _spcd_banner_split() { _spcd_banner_append \ - "${SPCD_BANNER_DOWN_AND_HORIZONTAL}" \ - "${SPCD_BANNER_VERTICAL}" \ - "${SPCD_BANNER_UP_AND_HORIZONTAL}" + "${_SPCD_BANNER_DOWN_AND_HORIZONTAL}" \ + "${_SPCD_BANNER_VERTICAL}" \ + "${_SPCD_BANNER_UP_AND_HORIZONTAL}" } _spcd_banner_wipe() { From 3a35802eb86cb73ccdc33f3f8fb3abd50da42d3c Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 16:19:21 +0200 Subject: [PATCH 29/33] __/step --- spcd/bootstrap.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 2edd1c7..7ad7504 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -84,7 +84,7 @@ _spcd_banner_add_index() { unset spcd_bai__level while true; do spcd_bai__level=$((spcd_bai__level + 1)) - eval "spcd_bai__value=\"\${SPCD_STEP_${spcd_bai__level}_INDEX}\"" + eval "spcd_bai__value=\"\${__SPCD_STEP_${spcd_bai__level}_INDEX}\"" [ -n "${spcd_bai__value}" ] || break if [ -n "${spcd_bai__label}" ]; then spcd_bai__label="${spcd_bai__label}.${spcd_bai__value}" @@ -125,7 +125,7 @@ _spcd_banner_render() { unset spcd_br__level while true; do spcd_br__level=$((spcd_br__level + 1)) - eval "spcd_br__value=\"\${SPCD_STEP_${spcd_br__level}_LABEL}\"" + eval "spcd_br__value=\"\${__SPCD_STEP_${spcd_br__level}_LABEL}\"" [ -n "${spcd_br__value}" ] || break _spcd_banner_add "${spcd_br__value}" done @@ -206,8 +206,8 @@ _SPCD_STEP_LEVEL=1 _spcd_step_wipe() { unset \ - "SPCD_STEP_${_SPCD_STEP_LEVEL}_INDEX" \ - "SPCD_STEP_${_SPCD_STEP_LEVEL}_LABEL" + "__SPCD_STEP_${_SPCD_STEP_LEVEL}_INDEX" \ + "__SPCD_STEP_${_SPCD_STEP_LEVEL}_LABEL" } # ╭───────────╮ @@ -376,7 +376,7 @@ spcd_split() { spcd_step() { if [ -n "${1}" ]; then - spcd_step__prefix="SPCD_STEP_${_SPCD_STEP_LEVEL}" + spcd_step__prefix="__SPCD_STEP_${_SPCD_STEP_LEVEL}" spcd_step__index="${spcd_step__prefix}_INDEX" eval "${spcd_step__index}=\$((${spcd_step__index} + 1))" eval "${spcd_step__prefix}_LABEL=\"${1}\"" @@ -1216,7 +1216,7 @@ spcd_python_write_module() { spcd_wpm__text="${spcd_wpm__text}${spcd_wpm__value} " done - spcd_wpm__index=$((SPCD_STEP_1_INDEX + 1)) + spcd_wpm__index=$((__SPCD_STEP_1_INDEX + 1)) for spcd_wpm__root in \ "${SPCD_PYTHON_PACKAGES}" "${SPCD_PYTHON_VENV_PACKAGES}"; do spcd_os_write "${spcd_wpm__root}/env.py" "${spcd_wpm__text} From 5e86e7368b5776d9e8b8641326805d7d1d726c0b Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 16:27:44 +0200 Subject: [PATCH 30/33] __/level --- spcd/bootstrap.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 7ad7504..903eafd 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -202,12 +202,10 @@ _SPCD_RULE_RIGHT="╴" # │ internals │ step │ # ╰───────────┴──────╯ -_SPCD_STEP_LEVEL=1 - _spcd_step_wipe() { unset \ - "__SPCD_STEP_${_SPCD_STEP_LEVEL}_INDEX" \ - "__SPCD_STEP_${_SPCD_STEP_LEVEL}_LABEL" + "__SPCD_STEP_${__SPCD_STEP_LEVEL}_INDEX" \ + "__SPCD_STEP_${__SPCD_STEP_LEVEL}_LABEL" } # ╭───────────╮ @@ -376,7 +374,8 @@ spcd_split() { spcd_step() { if [ -n "${1}" ]; then - spcd_step__prefix="__SPCD_STEP_${_SPCD_STEP_LEVEL}" + [ -n "${__SPCD_STEP_LEVEL}" ] || __SPCD_STEP_LEVEL=1 + spcd_step__prefix="__SPCD_STEP_${__SPCD_STEP_LEVEL}" spcd_step__index="${spcd_step__prefix}_INDEX" eval "${spcd_step__index}=\$((${spcd_step__index} + 1))" eval "${spcd_step__prefix}_LABEL=\"${1}\"" @@ -386,13 +385,13 @@ spcd_step() { spcd_step_in() { [ -n "${1}" ] && spcd_step "${1}" - _SPCD_STEP_LEVEL=$((_SPCD_STEP_LEVEL + 1)) + __SPCD_STEP_LEVEL=$((__SPCD_STEP_LEVEL + 1)) _spcd_step_wipe } spcd_step_out() { _spcd_step_wipe - _SPCD_STEP_LEVEL=$((_SPCD_STEP_LEVEL - 1)) + __SPCD_STEP_LEVEL=$((__SPCD_STEP_LEVEL - 1)) } # ╭───────╮ From 96ec535b838a19344ab987b27c5b9d7796399d96 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 16:28:37 +0200 Subject: [PATCH 31/33] ;; --- spcd/bootstrap.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 903eafd..6b033fd 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -944,10 +944,8 @@ installonly_limit=3 skip_if_unavailable=False " ;; - "${SPCD_PM_APK}") - ;; - "${SPCD_PM_PACMAN}") - ;; + "${SPCD_PM_APK}") ;; + "${SPCD_PM_PACMAN}") ;; "${SPCD_PM_APT}") spcd_os_write "/etc/apt/apt.conf.d/apt.conf" "\ Acquire::Check-Valid-Until True; @@ -957,8 +955,7 @@ APT::Install-Suggests False; Dir::Etc::SourceParts \"\"; " ;; - "${SPCD_PM_ZYPPER}") - ;; + "${SPCD_PM_ZYPPER}") ;; *) ;; esac case "${SPCD_OS_ID}" in From ad23eb51802d3438f2683914c655443eb1bec2aa Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 16:33:15 +0200 Subject: [PATCH 32/33] rm/1 --- spcd/bootstrap.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 6b033fd..2b493e0 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -305,10 +305,9 @@ spcd_os_printenv() { } spcd_os_rm() { - spcd_os_rm__path="${1}" - if [ -e "${spcd_os_rm__path}" ]; then - echo "← ${spcd_os_rm__path}" - rm -r "${spcd_os_rm__path}" + if [ -e "${1}" ]; then + echo "← ${1}" + rm -r "${1}" fi } From 428d6aebf414c99250084878a6ed88ea6e59e016 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 16:38:46 +0200 Subject: [PATCH 33/33] __/banner --- spcd/bootstrap.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 2b493e0..137ac96 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -69,7 +69,7 @@ _spcd_banner_add() { spcd_ba__filler="$( _spcd_fill "${spcd_ba__length}" "${_SPCD_BANNER_HORIZONTAL}" )" - if [ -n "${SPCD_BANNER_MIDDLE}" ]; then + if [ -n "${__SPCD_BANNER_MIDDLE}" ]; then _spcd_banner_split else _spcd_banner_open @@ -97,17 +97,17 @@ _spcd_banner_add_index() { _spcd_banner_append() { if [ -n "${3}" ]; then - SPCD_BANNER_TOP="${SPCD_BANNER_TOP}${1}" - SPCD_BANNER_MIDDLE="${SPCD_BANNER_MIDDLE}${2}" - SPCD_BANNER_BOTTOM="${SPCD_BANNER_BOTTOM}${3}" + __SPCD_BANNER_TOP="${__SPCD_BANNER_TOP}${1}" + __SPCD_BANNER_MIDDLE="${__SPCD_BANNER_MIDDLE}${2}" + __SPCD_BANNER_BOTTOM="${__SPCD_BANNER_BOTTOM}${3}" fi } _spcd_banner_echo() { echo "\ -${SPCD_BANNER_TOP} -${SPCD_BANNER_MIDDLE} -${SPCD_BANNER_BOTTOM}" +${__SPCD_BANNER_TOP} +${__SPCD_BANNER_MIDDLE} +${__SPCD_BANNER_BOTTOM}" } _spcd_banner_open() { @@ -151,9 +151,9 @@ _spcd_banner_split() { _spcd_banner_wipe() { unset \ - SPCD_BANNER_TOP \ - SPCD_BANNER_MIDDLE \ - SPCD_BANNER_BOTTOM + __SPCD_BANNER_TOP \ + __SPCD_BANNER_MIDDLE \ + __SPCD_BANNER_BOTTOM } # ╭───────────┬───────╮