From c633de9890fdbcfb4c34a65e9d553bca338ec5c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Valor=20Mart=C3=ADnez?= Date: Fri, 18 Dec 2020 22:38:39 +0100 Subject: [PATCH] added some color --- download.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/download.sh b/download.sh index a99df08..ceddbaa 100755 --- a/download.sh +++ b/download.sh @@ -177,9 +177,9 @@ esac wget "$URL" -O "$SYSTEM_HTML" # process system html to get game url list -printf "%s\r" "${BLUE_COLOR}Processing $SYSTEM_NAME. ${RESET_COLOR}" +printf "%s\n" "${BLUE_COLOR}Processing $SYSTEM_NAME. ${RESET_COLOR}" grep -E "Game/[0-9]+" -Eo "$SYSTEM_HTML" | sort -u | sed 's,Game/,https://retroachievements.org/linkedhashes.php?g=,' > "$URL_LIST" -echo "Found $(wc -l <"$URL_LIST") games." +printf "%s\n" "${BLUE_COLOR}Found $(wc -l <"$URL_LIST") games.${RESET_COLOR}" # create system folder for webpages with hashes if test -d "./${GAME_LIST_DIR}/$SYSTEM_NAME"; then @@ -240,5 +240,5 @@ perl -i -pe 's/(^\/.*?=)([0-9]+):([0-9A-Za-z]{32})/ "$3": $2,/' "${HASHLIBRAR echo " }" >> "${HASHLIBRARY_JSON}" echo "}" >> "${HASHLIBRARY_JSON}" perl -i -00pe 's/,(?!.*,)//s' "${HASHLIBRARY_JSON}" -printf "%s\n" "Parsed $(wc -l < "${HASHLIBRARY_JSON}") hashes from $(find "${GAME_LIST_DIR}"/"$1" -type f | wc -l) games. " +printf "%s\n" "${BLUE_COLOR}Parsed $(wc -l < "${HASHLIBRARY_JSON}") hashes from $(find "${GAME_LIST_DIR}"/"$1" -type f | wc -l) games. ${RESET_COLOR}" echo "File: $HASHLIBRARY_JSON created."