将备份脚本中的相对路径换为直接路径

This commit is contained in:
lsy 2024-07-26 19:38:03 +08:00
parent bbf2eaa789
commit bb1db6d572

View File

@ -52,19 +52,17 @@ fi
if [[ ! $aliyun_pick =~ [Nn] ]];then if [[ ! $aliyun_pick =~ [Nn] ]];then
cd "$path"
if [[ ! -d aliyunpan ]];then 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 unzip aliyunpan.zip
rm aliyunpan.zip unzip "${path}/aliyunpan.zip" -d "${path}"
declare tmp_file=$( ls | grep aliyunpan ) rm "${path}/aliyunpan.zip"
mv $tmp_file aliyunpan declare tmp_file=$( ls "${path}" | grep "aliyunpan" )
cd aliyunpan mv "${path}/${tmp_file}" "${path}/aliyunpan"
./aliyunpan login ${path}/aliyunpan/aliyunpan login
else else
echo "检测到阿里云盘已经存在,请确认是否登录" echo "检测到阿里云盘已经存在,请确认是否登录"
cd aliyunpan ${path}/aliyunpan/aliyunpan who
./aliyunpan who
fi fi
fi fi