From 6f6fd6a42e6531328ad228d93eb51ae810afc268 Mon Sep 17 00:00:00 2001 From: DDSRem <1448139087@qq.com> Date: Tue, 20 Feb 2024 14:38:36 +0800 Subject: [PATCH] fix: bug --- update | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/update b/update index 22396229..f5e92f03 100644 --- a/update +++ b/update @@ -1,6 +1,7 @@ #!/bin/bash # shellcheck shell=bash # shellcheck disable=SC2086 +# shellcheck disable=SC2144 # 下载及解压 download_and_unzip() { @@ -8,7 +9,9 @@ download_and_unzip() { target_dir="$2" echo "正在下载 ${url}..." if curl ${CURL_OPTIONS} "${url}" ${CURL_HEADERS} | busybox unzip -d /tmp -; then - mv /tmp/MoviePilot-* /tmp/"${target_dir}" + if [ -e /tmp/MoviePilot-* ]; then + mv /tmp/MoviePilot-* /tmp/"${target_dir}" + fi else return 1 fi