From bb1db6d572f5b0f4b708f5c44e0d4d95f4fd7cf0 Mon Sep 17 00:00:00 2001 From: lsy Date: Fri, 26 Jul 2024 19:38:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E5=A4=87=E4=BB=BD=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E7=9B=B8=E5=AF=B9=E8=B7=AF=E5=BE=84=E6=8D=A2?= =?UTF-8?q?=E4=B8=BA=E7=9B=B4=E6=8E=A5=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Config/Automation/backup.sh | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/Config/Automation/backup.sh b/Config/Automation/backup.sh index 5855c15..7eb4484 100644 --- a/Config/Automation/backup.sh +++ b/Config/Automation/backup.sh @@ -52,19 +52,17 @@ fi if [[ ! $aliyun_pick =~ [Nn] ]];then - cd "$path" if [[ ! -d aliyunpan ]];then - wget https://github.com/tickstep/aliyunpan/releases/download/v0.3.2/aliyunpan-v0.3.2-linux-amd64.zip -O aliyunpan.zip + wget -P "${path}" https://github.com/tickstep/aliyunpan/releases/download/v0.3.2/aliyunpan-v0.3.2-linux-amd64.zip -O "${path}/aliyunpan.zip" unzip aliyunpan.zip - rm aliyunpan.zip - declare tmp_file=$( ls | grep aliyunpan ) - mv $tmp_file aliyunpan - cd aliyunpan - ./aliyunpan login + unzip "${path}/aliyunpan.zip" -d "${path}" + rm "${path}/aliyunpan.zip" + declare tmp_file=$( ls "${path}" | grep "aliyunpan" ) + mv "${path}/${tmp_file}" "${path}/aliyunpan" + ${path}/aliyunpan/aliyunpan login else echo "检测到阿里云盘已经存在,请确认是否登录" - cd aliyunpan - ./aliyunpan who + ${path}/aliyunpan/aliyunpan who fi fi