From 90aa5271a61389e23aba24b2bbb90c1bf5902f4b Mon Sep 17 00:00:00 2001 From: lsy Date: Fri, 26 Jul 2024 19:23:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A3=80=E6=B5=8B=E9=98=BF=E9=87=8C=E4=BA=91?= =?UTF-8?q?=E7=9B=98=E6=96=87=E4=BB=B6=E6=98=AF=E5=90=A6=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E5=AD=98=E5=9C=A8=E5=88=99=E9=81=BF=E5=85=8D?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E4=B8=8B=E8=BD=BD,=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Config/Automation/backup.sh | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/Config/Automation/backup.sh b/Config/Automation/backup.sh index 4645bd0..25d87e0 100644 --- a/Config/Automation/backup.sh +++ b/Config/Automation/backup.sh @@ -53,13 +53,18 @@ fi if [[ ! $aliyun_pick =~ [Nn] ]];then cd "$path" - wget https://github.com/tickstep/aliyunpan/releases/download/v0.3.2/aliyunpan-v0.3.2-linux-amd64.zip -O aliyunpan.zip - unzip aliyunpan.zip - rm aliyunpan.zip - declare tmp_file=$( ls | grep aliyunpan ) - mv $tmp_file aliyunpan - cd aliyunpan - ./aliyunpan login + 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 + unzip aliyunpan.zip + rm aliyunpan.zip + declare tmp_file=$( ls | grep aliyunpan ) + mv $tmp_file aliyunpan + cd aliyunpan + ./aliyunpan login + else + echo "检测到阿里云盘已经存在,请确认是否登录" + ./aliyunpan who + fi fi cat > "${path}/backup.sh" << EOF