检测阿里云盘文件是否存在如果存在则避免重复下载,登录

This commit is contained in:
lsy 2024-07-26 19:23:25 +08:00
parent 49199ef77f
commit 90aa5271a6

View File

@ -53,6 +53,7 @@ fi
if [[ ! $aliyun_pick =~ [Nn] ]];then if [[ ! $aliyun_pick =~ [Nn] ]];then
cd "$path" 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 https://github.com/tickstep/aliyunpan/releases/download/v0.3.2/aliyunpan-v0.3.2-linux-amd64.zip -O aliyunpan.zip
unzip aliyunpan.zip unzip aliyunpan.zip
rm aliyunpan.zip rm aliyunpan.zip
@ -60,6 +61,10 @@ if [[ ! $aliyun_pick =~ [Nn] ]];then
mv $tmp_file aliyunpan mv $tmp_file aliyunpan
cd aliyunpan cd aliyunpan
./aliyunpan login ./aliyunpan login
else
echo "检测到阿里云盘已经存在,请确认是否登录"
./aliyunpan who
fi
fi fi
cat > "${path}/backup.sh" << EOF cat > "${path}/backup.sh" << EOF