From 983e6f828b31c16e6ef6194000828caeff1c0e76 Mon Sep 17 00:00:00 2001 From: Kroese Date: Thu, 11 May 2023 19:58:31 +0200 Subject: [PATCH] Colors in log --- run/install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/run/install.sh b/run/install.sh index 79c3f40..1aa1782 100644 --- a/run/install.sh +++ b/run/install.sh @@ -4,7 +4,7 @@ set -Eeuo pipefail TMP="/boot.img" rm -f "$TMP" -echo "Downloading ${BOOT} as boot image..." +info "Downloading ${BOOT} as boot image..." # Check if running with interactive TTY or redirected to docker log if [ -t 1 ]; then @@ -16,14 +16,14 @@ fi [[ "${DEBUG}" == [Yy1]* ]] && set -x { wget "$BOOT" -O "$TMP" -q --no-check-certificate --show-progress "$PROGRESS"; rc=$?; } || : -(( rc != 0 )) && echo "ERROR: Failed to download ${BOOT}, reason: $rc" && exit 60 -[ ! -f "$TMP" ] && echo "Failed to download ${BOOT}" && exit 61 +(( rc != 0 )) && error "Failed to download ${BOOT}, reason: $rc" && exit 60 +[ ! -f "$TMP" ] && error "Failed to download ${BOOT}" && exit 61 SIZE=$(stat -c%s "$TMP") if ((SIZE<100000)); then - echo "Invalid ISO file: Size is smaller than 100 KB" && exit 62 + error "Invalid ISO file: Size is smaller than 100 KB" && exit 62 fi FILE="$STORAGE/boot.img"