From 54692e3a75789e3d54fc60a8f116954ad4330016 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sat, 9 Dec 2023 06:19:07 +0100 Subject: [PATCH] fix: Move progress (#443) --- src/install.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/install.sh b/src/install.sh index 2d8de66..38e4bf1 100644 --- a/src/install.sh +++ b/src/install.sh @@ -40,13 +40,6 @@ if [ -z "$URL" ]; then fi fi -# Check if output is to interactive TTY -if [ -t 1 ]; then - PROGRESS="--progress=bar:noscroll" -else - PROGRESS="--progress=dot:giga" -fi - BASE=$(basename "$URL" .pat) if [[ "$URL" != "file://${STORAGE}/${BASE}.pat" ]]; then @@ -96,6 +89,13 @@ if [[ "$TMP" != "$STORAGE/tmp" ]]; then (( MIN_SPACE > SPACE )) && error "Not enough free space for installation in ${STORAGE}, have ${SPACE_GB} GB available but need at least 6 GB." && exit 94 fi +# Check if output is to interactive TTY +if [ -t 1 ]; then + PROGRESS="--progress=bar:noscroll" +else + PROGRESS="--progress=dot:giga" +fi + # Download the required files from the Synology website RDC="$STORAGE/dsm.rd"