From b2f5e28b95b8514c1e5071672642e6f6c630f55d Mon Sep 17 00:00:00 2001 From: Damonxue Date: Wed, 9 Apr 2025 09:25:46 +0800 Subject: [PATCH] fix: remove duplicate download check for rustfs-console-latest.zip --- scripts/run.sh | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/scripts/run.sh b/scripts/run.sh index 4defb1f1..37e703f9 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -1,5 +1,12 @@ #!/bin/bash -e +# check ./rustfs/static/index.html not exists +if [ ! -f ./rustfs/static/index.html ]; then + echo "Downloading rustfs-console-latest.zip" + # download rustfs-console-latest.zip do not show log + curl -s -L "https://dl.rustfs.com/artifacts/console/rustfs-console-latest.zip" -o tempfile.zip && unzip -q -o tempfile.zip -d ./rustfs/static && rm tempfile.zip +fi + if [ -z "$SKIP_BUILD" ]; then cargo build -p rustfs --bins fi @@ -34,12 +41,4 @@ if [ -n "$1" ]; then fi - -# check ./rustfs/static/index.html not exists -if [ ! -f ./rustfs/static/index.html ]; then - echo "Downloading rustfs-console-latest.zip" - # download rustfs-console-latest.zip do not show log - curl -s -L "https://dl.rustfs.com/artifacts/console/rustfs-console-latest.zip" -o tempfile.zip && unzip -q -o tempfile.zip -d ./rustfs/static && rm tempfile.zip -fi - cargo run --bin rustfs \ No newline at end of file