diff --git a/chd_from_zip.sh b/chd_from_zip.sh index c673231..228b98b 100755 --- a/chd_from_zip.sh +++ b/chd_from_zip.sh @@ -18,12 +18,19 @@ if [ ! -d "$1" ]; then exit 0 fi +# Colores +WHITE=$(tput setaf 7) +RED_BG=$(tput setab 1) +NORMAL=$(tput sgr0) + # Procesa los ficheros for zipfile in "${sourcedir}"/*.zip; do gameName="$(basename "$zipfile" .zip)" if [ -f "${destdir}/${gameName}.chd" ]; then 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 echo -e "\e[1m\e[41mExtracting ${gameName}...\033[0m" 7z x "${zipfile}" -o"${destdir}/${gameName}-tmp" diff --git a/colors.sh b/colors.sh index ce58a6b..14b02f3 100755 --- a/colors.sh +++ b/colors.sh @@ -10,11 +10,11 @@ BLUE=$(tput setaf 4) #MAGENTA=$(tput setaf 5) #CYAN=$(tput setaf 6) -#WHITE=$(tput setaf 7) +WHITE=$(tput setaf 7) # Fondo #BLACK_BG=$(tput setab 0) -#RED_BG=$(tput setab 1) +RED_BG=$(tput setab 1) #GREEN_BG=$(tput setab 2) #YELLOW_BG=$(tput setab 3) #LIME_YELLOW_BG=$(tput setab 190) @@ -30,5 +30,10 @@ NORMAL=$(tput sgr0) #BLINK=$(tput blink) #REVERSE=$(tput smso) #UNDERLINE=$(tput smul) +BOLD=$(tput bold) -printf "%40s\n" "${BLUE}This text is blue${NORMAL}" \ No newline at end of file +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}" \ No newline at end of file