Fix $COLUMNS visual bug

This commit is contained in:
Fabio Belavenuto 2022-09-29 16:33:15 -03:00
parent 13c04a1939
commit 12e13fff51
2 changed files with 8 additions and 6 deletions

3
TODO
View File

@ -1,7 +1,8 @@
A fazer
- Checar NVME no modelo DS920+, DS918+
- J4125, HP G7 N40L desligando (#110 #160)
- Checar módulo tg3 no próprio loader (BCM57780 [1025:033d]) (#31)
- Checar módulo tg3 no próprio loader (BCM57780 [14e4:1692]) (#31)
- Ver se vale a pena colocar uma opção para configurações extras, como escolher qual módulo realtek usar (R8168 ou R8169)
Concluidos:
- Generalizar código dos addons

View File

@ -7,13 +7,14 @@ set -e
# Sanity check
loaderIsConfigured || die "Loader is not configured!"
# Print text centralized, if variable ${COLUMNS} is defined
# Print text centralized
clear
[ -z "${COLUMNS}" ] && COLUMNS=50
TITLE="Welcome to Automated Redpill Loader v${ARPL_VERSION}"
printf "\033[1;44m%*s\n" $COLUMNS ""
printf "\033[1;44m%*s\033[A\n" $COLUMNS ""
printf "\033[1;32m%*s\033[0m\n" $(((${#TITLE}+$COLUMNS)/2)) "${TITLE}"
printf "\033[1;44m%*s\033[0m\n" $COLUMNS ""
printf "\033[1;44m%*s\n" ${COLUMNS} ""
printf "\033[1;44m%*s\033[A\n" ${COLUMNS} ""
printf "\033[1;32m%*s\033[0m\n" $(((${#TITLE}+${COLUMNS})/2)) "${TITLE}"
printf "\033[1;44m%*s\033[0m\n" ${COLUMNS} ""
TITLE="BOOTING..."
printf "\033[1;33m%*s\033[0m\n" $(((${#TITLE}+${COLUMNS})/2)) "${TITLE}"