colors.sh: Añadido negrita

This commit is contained in:
2023-04-03 19:57:35 +02:00
parent 32d32cb223
commit c7ac35cf38
2 changed files with 15 additions and 3 deletions
+7
View File
@@ -18,12 +18,19 @@ if [ ! -d "$1" ]; then
exit 0 exit 0
fi fi
# Colores
WHITE=$(tput setaf 7)
RED_BG=$(tput setab 1)
NORMAL=$(tput sgr0)
# Procesa los ficheros # Procesa los ficheros
for zipfile in "${sourcedir}"/*.zip; do for zipfile in "${sourcedir}"/*.zip; do
gameName="$(basename "$zipfile" .zip)" gameName="$(basename "$zipfile" .zip)"
if [ -f "${destdir}/${gameName}.chd" ]; then if [ -f "${destdir}/${gameName}.chd" ]; then
echo -e "\e[1m\e[41m${gameName}.chd already exists\033[0m" echo -e "\e[1m\e[41m${gameName}.chd already exists\033[0m"
TEXT="${gameName}.chd already exists"
printf "%s\n" "${WHITE}${RED_BG}${TEXT}${NORMAL}"
else else
echo -e "\e[1m\e[41mExtracting ${gameName}...\033[0m" echo -e "\e[1m\e[41mExtracting ${gameName}...\033[0m"
7z x "${zipfile}" -o"${destdir}/${gameName}-tmp" 7z x "${zipfile}" -o"${destdir}/${gameName}-tmp"
+8 -3
View File
@@ -10,11 +10,11 @@
BLUE=$(tput setaf 4) BLUE=$(tput setaf 4)
#MAGENTA=$(tput setaf 5) #MAGENTA=$(tput setaf 5)
#CYAN=$(tput setaf 6) #CYAN=$(tput setaf 6)
#WHITE=$(tput setaf 7) WHITE=$(tput setaf 7)
# Fondo # Fondo
#BLACK_BG=$(tput setab 0) #BLACK_BG=$(tput setab 0)
#RED_BG=$(tput setab 1) RED_BG=$(tput setab 1)
#GREEN_BG=$(tput setab 2) #GREEN_BG=$(tput setab 2)
#YELLOW_BG=$(tput setab 3) #YELLOW_BG=$(tput setab 3)
#LIME_YELLOW_BG=$(tput setab 190) #LIME_YELLOW_BG=$(tput setab 190)
@@ -30,5 +30,10 @@ NORMAL=$(tput sgr0)
#BLINK=$(tput blink) #BLINK=$(tput blink)
#REVERSE=$(tput smso) #REVERSE=$(tput smso)
#UNDERLINE=$(tput smul) #UNDERLINE=$(tput smul)
BOLD=$(tput bold)
printf "%40s\n" "${BLUE}This text is blue${NORMAL}" printf "%40s\n" "${BLUE}This text is blue${NORMAL}"
gameName=Sonic
TEXT=">> ${gameName}.chd already exists"
printf "%s\n" "${BOLD}${WHITE}${RED_BG}${TEXT}${NORMAL}"