Compare commits

..

No commits in common. "d7142f2b1d4f65d5a4a04e79885f25a728b4311e" and "937ed5e1f129403d520f6812acf7a32035319eed" have entirely different histories.

2 changed files with 58 additions and 59 deletions

View file

@ -285,7 +285,6 @@ Handle project workflows in a unified way:
* automate versions fetching * automate versions fetching
* gource, xvfb, xauth * gource, xvfb, xauth
* handle openh264 repositories * handle openh264 repositories
* rpm fusion
* tex * tex
* translate to french * translate to french
* try to support nix * try to support nix

View file

@ -4,9 +4,9 @@
# │ __ = internal │ # │ __ = internal │
# ╰───────────────╯ # ╰───────────────╯
# __SPCD_BAR_TOP # __SPCD_BANNER_TOP
# __SPCD_BAR_MIDDLE # __SPCD_BANNER_MIDDLE
# __SPCD_BAR_BOTTOM # __SPCD_BANNER_BOTTOM
# __SPCD_STEP_LEVEL # __SPCD_STEP_LEVEL
# __SPCD_STEP_level_INDEX # __SPCD_STEP_level_INDEX
@ -36,35 +36,35 @@ _spcd_fill() {
done done
} }
# ╭───┬───── # ╭───┬────────
# │ _ │ bar │ # │ _ │ banner │
# ╰───┴───── # ╰───┴────────
_SPCD_BAR_BOTTOM_LEFT="${_SPCD_BOX_UP_AND_RIGHT}" _SPCD_BANNER_BOTTOM_LEFT="${_SPCD_BOX_UP_AND_RIGHT}"
_SPCD_BAR_BOTTOM_MIDDLE="${_SPCD_BOX_UP_AND_HORIZONTAL}" _SPCD_BANNER_BOTTOM_MIDDLE="${_SPCD_BOX_UP_AND_HORIZONTAL}"
_SPCD_BAR_BOTTOM_RIGHT="${_SPCD_BOX_UP_AND_LEFT}" _SPCD_BANNER_BOTTOM_RIGHT="${_SPCD_BOX_UP_AND_LEFT}"
_SPCD_BAR_HORIZONTAL="${_SPCD_BOX_HORIZONTAL}" _SPCD_BANNER_HORIZONTAL="${_SPCD_BOX_HORIZONTAL}"
_SPCD_BAR_TOP_LEFT="${_SPCD_BOX_DOWN_AND_RIGHT}" _SPCD_BANNER_TOP_LEFT="${_SPCD_BOX_DOWN_AND_RIGHT}"
_SPCD_BAR_TOP_MIDDLE="${_SPCD_BOX_DOWN_AND_HORIZONTAL}" _SPCD_BANNER_TOP_MIDDLE="${_SPCD_BOX_DOWN_AND_HORIZONTAL}"
_SPCD_BAR_TOP_RIGHT="${_SPCD_BOX_DOWN_AND_LEFT}" _SPCD_BANNER_TOP_RIGHT="${_SPCD_BOX_DOWN_AND_LEFT}"
_SPCD_BAR_VERTICAL="${_SPCD_BOX_VERTICAL}" _SPCD_BANNER_VERTICAL="${_SPCD_BOX_VERTICAL}"
_spcd_bar_add() { _spcd_banner_add() {
if [ -n "${1}" ]; then if [ -n "${1}" ]; then
local text length filler local text length filler
text=" ${1} " text=" ${1} "
length=${#text} length=${#text}
filler="$(_spcd_fill "${length}" "${_SPCD_BAR_HORIZONTAL}")" filler="$(_spcd_fill "${length}" "${_SPCD_BANNER_HORIZONTAL}")"
if [ -n "${__SPCD_BAR_MIDDLE}" ]; then if [ -n "${__SPCD_BANNER_MIDDLE}" ]; then
_spcd_bar_split _spcd_banner_split
else else
_spcd_bar_open _spcd_banner_open
fi fi
_spcd_bar_append "${filler}" "${text}" "${filler}" _spcd_banner_append "${filler}" "${text}" "${filler}"
fi fi
} }
_spcd_bar_add_index() { _spcd_banner_add_index() {
local level value label local level value label
while true; do while true; do
level=$((level + 1)) level=$((level + 1))
@ -76,68 +76,68 @@ _spcd_bar_add_index() {
label="${value}" label="${value}"
fi fi
done done
_spcd_bar_add "${label}" _spcd_banner_add "${label}"
} }
_spcd_bar_append() { _spcd_banner_append() {
if [ -n "${3}" ]; then if [ -n "${3}" ]; then
__SPCD_BAR_TOP="${__SPCD_BAR_TOP}${1}" __SPCD_BANNER_TOP="${__SPCD_BANNER_TOP}${1}"
__SPCD_BAR_MIDDLE="${__SPCD_BAR_MIDDLE}${2}" __SPCD_BANNER_MIDDLE="${__SPCD_BANNER_MIDDLE}${2}"
__SPCD_BAR_BOTTOM="${__SPCD_BAR_BOTTOM}${3}" __SPCD_BANNER_BOTTOM="${__SPCD_BANNER_BOTTOM}${3}"
fi fi
} }
_spcd_bar_echo() { _spcd_banner_echo() {
echo "\ echo "\
${__SPCD_BAR_TOP} ${__SPCD_BANNER_TOP}
${__SPCD_BAR_MIDDLE} ${__SPCD_BANNER_MIDDLE}
${__SPCD_BAR_BOTTOM}" ${__SPCD_BANNER_BOTTOM}"
} }
_spcd_bar_open() { _spcd_banner_open() {
_spcd_bar_append \ _spcd_banner_append \
"${_SPCD_BAR_TOP_LEFT}" \ "${_SPCD_BANNER_TOP_LEFT}" \
"${_SPCD_BAR_VERTICAL}" \ "${_SPCD_BANNER_VERTICAL}" \
"${_SPCD_BAR_BOTTOM_LEFT}" "${_SPCD_BANNER_BOTTOM_LEFT}"
} }
_spcd_bar_render() { _spcd_banner_render() {
_spcd_bar_wipe _spcd_banner_wipe
_spcd_bar_add "S" _spcd_banner_add "S"
_spcd_bar_add_index _spcd_banner_add_index
# #
local level value local level value
while true; do while true; do
level=$((level + 1)) level=$((level + 1))
eval "value=\"\${__SPCD_STEP_${level}_LABEL}\"" eval "value=\"\${__SPCD_STEP_${level}_LABEL}\""
[ -n "${value}" ] || break [ -n "${value}" ] || break
_spcd_bar_add "${value}" _spcd_banner_add "${value}"
done done
# #
_spcd_bar_shut _spcd_banner_shut
_spcd_bar_echo _spcd_banner_echo
_spcd_bar_wipe _spcd_banner_wipe
} }
_spcd_bar_shut() { _spcd_banner_shut() {
_spcd_bar_append \ _spcd_banner_append \
"${_SPCD_BAR_TOP_RIGHT}" \ "${_SPCD_BANNER_TOP_RIGHT}" \
"${_SPCD_BAR_VERTICAL}" \ "${_SPCD_BANNER_VERTICAL}" \
"${_SPCD_BAR_BOTTOM_RIGHT}" "${_SPCD_BANNER_BOTTOM_RIGHT}"
} }
_spcd_bar_split() { _spcd_banner_split() {
_spcd_bar_append \ _spcd_banner_append \
"${_SPCD_BAR_TOP_MIDDLE}" \ "${_SPCD_BANNER_TOP_MIDDLE}" \
"${_SPCD_BAR_VERTICAL}" \ "${_SPCD_BANNER_VERTICAL}" \
"${_SPCD_BAR_BOTTOM_MIDDLE}" "${_SPCD_BANNER_BOTTOM_MIDDLE}"
} }
_spcd_bar_wipe() { _spcd_banner_wipe() {
unset \ unset \
__SPCD_BAR_TOP \ __SPCD_BANNER_TOP \
__SPCD_BAR_MIDDLE \ __SPCD_BANNER_MIDDLE \
__SPCD_BAR_BOTTOM __SPCD_BANNER_BOTTOM
} }
# ╭───┬───────╮ # ╭───┬───────╮
@ -320,7 +320,7 @@ spcd_step() {
local index="${prefix}_INDEX" local index="${prefix}_INDEX"
eval "${index}=\$((${index} + 1))" eval "${index}=\$((${index} + 1))"
eval "${prefix}_LABEL=\"${1}\"" eval "${prefix}_LABEL=\"${1}\""
_spcd_bar_render _spcd_banner_render
fi fi
} }