Compare commits

..

No commits in common. "c0d42e6208b9c0daf864a29eadcfcb86fb3f619f" and "cc96c1cd81ad872c637a997812223d18bc76c78d" have entirely different histories.

2 changed files with 16 additions and 46 deletions

View file

@ -213,8 +213,8 @@ Handle project workflows in a unified way:
### Shell
* banner with constants for characters
* comment
* fit banner to text
* review repositories handling for systems
* opensuse
* codecs repository

View file

@ -828,38 +828,10 @@ ${SPCD_PYTHON_ALIAS} / ${spcd_stp__name}"
# functions
spcd_banner() {
unset SPCD_BANNER_1 SPCD_BANNER_2 SPCD_BANNER_3
spcd_banner_add_123 "${SPCD_DOWN}" "${SPCD_VERT}" "${SPCD___UP}"
#
spcd_banner__index="${SPCD_STEP}"
[ -n "${SPCD_SUBSTEP}" ] &&
spcd_banner__index="${spcd_banner__index}.${SPCD_SUBSTEP}"
spcd_banner_add "${spcd_banner__index}"
#
for spcd_banner__item in "${SPCD_STEP_TEXT}" "${SPCD_SUBSTEP_TEXT}"; do
spcd_banner_add_123 "┬" "${SPCD_VERT}" "┴"
spcd_banner_add "${spcd_banner__item}"
done
#
spcd_banner_add_123 "╮" "${SPCD_VERT}" "╯"
}
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_add_123 \
"${spcd_ba__filler}" "${spcd_ba__text}" "${spcd_ba__filler}"
fi
}
spcd_banner_add_123() {
if [ -n "${3}" ]; then
SPCD_BANNER_1="${SPCD_BANNER_1}${1}"
SPCD_BANNER_2="${SPCD_BANNER_2}${2}"
SPCD_BANNER_3="${SPCD_BANNER_3}${3}"
fi
echo "\
${SPCD_DOWN}
${SPCD_VERT} ${*}
${SPCD___UP}"
}
spcd_cat() {
@ -893,20 +865,14 @@ spcd_error_os() {
exit "${SPCD_ERROR_OS}"
}
spcd_fill() {
spcd_fill__index=${1}
while [ "${spcd_fill__index}" -gt 0 ]; do
printf "%s" "${2}"
spcd_fill__index=$((spcd_fill__index - 1))
done
}
spcd_git_clone() {
if [ -n "${1}" ]; then
spcd_gc__name="$(basename "${1}")"
spcd_gc__path="${SPCD_DL}/${spcd_gc__name}"
spcd_gc__url="$(spcd_git_url "${1}")"
git clone "${spcd_gc__url}" "${spcd_gc__path}"
git clone \
"${spcd_gc__url}" \
"${spcd_gc__path}"
echo "${spcd_gc__path}"
fi
}
@ -1019,14 +985,18 @@ spcd_split() {
spcd_step() {
SPCD_STEP=$((SPCD_STEP + 1))
SPCD_STEP_TEXT="${*}"
unset SPCD_SUBSTEP SPCD_SUBSTEP_TEXT
spcd_banner
unset SPCD_SUBSTEP
spcd_banner "${SPCD_STEP}" "${SPCD_VERT}" "${SPCD_STEP_TEXT}"
}
spcd_substep() {
SPCD_SUBSTEP=$((SPCD_SUBSTEP + 1))
SPCD_SUBSTEP_TEXT="${*}"
spcd_banner
spcd_banner \
"${SPCD_STEP}.${SPCD_SUBSTEP}" \
"${SPCD_VERT}" \
"${SPCD_STEP_TEXT}" \
"${SPCD_VERT}" \
"${*}"
}
spcd_write() {