Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
vernesong committed Nov 20, 2024
1 parent bb79940 commit 0f6313f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion luci-app-openclash/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ define Build/Prepare
$(CP) $(CURDIR)/luasrc $(PKG_BUILD_DIR)
$(foreach po,$(wildcard ${CURDIR}/po/zh-cn/*.po), \
po2lmo $(po) $(PKG_BUILD_DIR)/$(patsubst %.po,%.lmo,$(notdir $(po)));)
sed -i "s/v0.00.00-beta/v$(PKG_VERSION)-beta/g" $(PKG_BUILD_DIR)/root/www/luci-static/resources/openclash/img/version.svg >/dev/null 2>&1
sed -i "s/v0.00.00/v$(PKG_VERSION)/g" $(PKG_BUILD_DIR)/root/www/luci-static/resources/openclash/img/version.svg >/dev/null 2>&1
chmod 0755 $(PKG_BUILD_DIR)/root/etc/init.d/openclash
chmod -R 0755 $(PKG_BUILD_DIR)/root/usr/share/openclash/
mkdir -p $(PKG_BUILD_DIR)/root/etc/openclash/config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ LAST_VER=$(sed -n 1p "$LAST_OPVER" 2>/dev/null |sed "s/^v//g" |tr -d "\n")
if [ -x "/bin/opkg" ]; then
OP_CV=$(rm -f /var/lock/opkg.lock && opkg status luci-app-openclash 2>/dev/null |grep 'Version' |awk -F 'Version: ' '{print $2}' |awk -F '.' '{print $2$3}' 2>/dev/null)
elif [ -x "/usr/bin/apk" ]; then
OP_CV=$(apk list luci-app-openclash 2>/dev/null |grep 'installed' | grep -oE '\d+(\.\d+)*' | head -1apk list luci-app-openclash 2>/dev/null|grep 'installed' | grep -oE '\d+(\.\d+)*' | head -1 |awk -F '.' '{print $2$3}' 2>/dev/null)
OP_CV=$(apk list luci-app-openclash 2>/dev/null |grep 'installed' | grep -oE '\d+(\.\d+)*' | head -1 |awk -F '.' '{print $2$3}' 2>/dev/null)
fi
OP_LV=$(sed -n 1p "$LAST_OPVER" 2>/dev/null |awk -F 'v' '{print $2}' |awk -F '.' '{print $2$3}' 2>/dev/null)
RELEASE_BRANCH=$(uci -q get openclash.config.release_branch || echo "master")
Expand Down Expand Up @@ -127,10 +127,10 @@ SLOG_CLEAN()
echo "" > $START_LOG
}
LOG_OUT "Uninstalling The Old Version, Please Do not Refresh The Page or Do Other Operations..."
uci -q set openclash.config.enable=0
uci -q commit openclash
if [ -x "/bin/opkg" ]; then
LOG_OUT "Uninstalling The Old Version, Please Do not Refresh The Page or Do Other Operations..."
opkg remove --force-depends --force-remove luci-app-openclash
fi
LOG_OUT "Installing The New Version, Please Do Not Refresh The Page or Do Other Operations..."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if [ "$TIME" != "$CHTIME" ]; then
fi

if [ "${PIPESTATUS[0]}" -eq 0 ] && [ -z "$(cat $LAST_OPVER |grep '<html>')" ]; then
OP_LV=$(sed -n 1p $LAST_OPVER 2>/dev/null |awk -F '-' '{print $1}' |awk -F 'v' '{print $2}' |awk -F '.' '{print $2$3}' 2>/dev/null)
OP_LV=$(sed -n 1p $LAST_OPVER 2>/dev/null |awk -F 'v' '{print $2}' |awk -F '.' '{print $2$3}' 2>/dev/null)
if [ "$(expr "$OP_CV" \>= "$OP_LV")" = "1" ]; then
sed -i '/^https:/,$d' $LAST_OPVER
elif [ "$(expr "$OP_LV" \> "$OP_CV")" = "1" ] && [ -n "$OP_LV" ]; then
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0f6313f

Please sign in to comment.