Skip to content

Commit

Permalink
Update diy-part1.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Lenyu2020 authored Dec 20, 2024
1 parent 983aca2 commit e0ed2bc
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions diy-part1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -421,23 +421,28 @@ echo_orange() {
# Preparing for update (blue message)
echo_blue "正在做更新前的准备工作..."
# 下载 unzip 包
echo "开始下载 unzip 包..."
wget -q --show-progress "$UNZIP_URL" -O "$UNZIP_PACKAGE"
# 检查下载是否成功
if [ $? -eq 0 ]; then
echo "下载成功,开始安装 unzip 包..."
opkg install "$UNZIP_PACKAGE" 2>/dev/null
# 检查安装是否成功
# 检查 unzip 是否已安装
if opkg list-installed | grep -q unzip; then
echo "unzip 已经安装,跳过安装步骤。"
else
# 下载 unzip 包
echo "开始下载 unzip 包..."
wget -q --show-progress "$UNZIP_URL" -O "$UNZIP_PACKAGE"
# 检查下载是否成功
if [ $? -eq 0 ]; then
echo "unzip 安装成功!"
echo "下载成功,开始安装 unzip 包..."
opkg install "$UNZIP_PACKAGE"
# 检查安装是否成功
if [ $? -eq 0 ]; then
echo "unzip 安装成功!"
else
echo "unzip 安装失败!"
fi
else
echo "unzip 安装失败!"
echo "unzip 下载失败!"
fi
else
echo "unzip 下载失败!"
fi
# Create temporary directory
mkdir -p "$TEMP_DIR"
Expand Down Expand Up @@ -499,6 +504,7 @@ echo_blue "插件已安装并且passwall服务已重启。"
rm -rf $TEMP_DIR
exit 0
EOF


0 comments on commit e0ed2bc

Please sign in to comment.