OpenClash: sync with upstream source

This commit is contained in:
CN_SZTL 2020-02-26 15:52:31 +08:00
parent 6222b801a7
commit 5287abc77d
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
3 changed files with 8 additions and 9 deletions

View File

@ -26,14 +26,13 @@ define Package/$(PKG_NAME)/postinst
endef
define Build/Prepare
$(CP) $(CURDIR)/files $(PKG_BUILD_DIR)
$(foreach po,$(wildcard ${CURDIR}/i18n/zh-cn/*.po), \
po2lmo $(po) $(PKG_BUILD_DIR)/$(patsubst %.po,%.lmo,$(notdir $(po)));)
chmod 0755 $(PKG_BUILD_DIR)/files/etc/init.d/openclash
chmod -R 0755 $(PKG_BUILD_DIR)/files/usr/share/openclash/
mkdir -p $(PKG_BUILD_DIR)/files/etc/openclash/config >/dev/null 2>&1
mkdir -p $(PKG_BUILD_DIR)/files/etc/openclash/proxy_provider >/dev/null 2>&1
mkdir -p $(PKG_BUILD_DIR)/files/etc/openclash/backup >/dev/null 2>&1
chmod 0755 ${CURDIR}/files/etc/init.d/openclash
chmod -R 0755 ${CURDIR}/files/usr/share/openclash/
mkdir -p ${CURDIR}/files/etc/openclash/config >/dev/null 2>&1
mkdir -p ${CURDIR}/files/etc/openclash/proxy_provider >/dev/null 2>&1
mkdir -p ${CURDIR}/files/etc/openclash/backup >/dev/null 2>&1
endef
define Build/Configure
@ -158,7 +157,7 @@ endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n
$(INSTALL_DATA) $(PKG_BUILD_DIR)/*.*.lmo $(1)/usr/lib/lua/luci/i18n/
$(CP) $(PKG_BUILD_DIR)/files/* $(1)/
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@ -102,7 +102,7 @@ num=$(grep -c "name:" $group_file)
cfg_get()
{
echo "$(grep "$1" "$2" 2>/dev/null |awk -v tag=$1 'BEGIN{FS=tag} {print $2}' 2>/dev/null |sed 's/,.*//' 2>/dev/null |sed 's/^ \{0,\}//g' 2>/dev/null |sed 's/ \{0,\}$//g' 2>/dev/null |sed 's/ \{0,\}\}\{0,\}$//g' 2>/dev/null)"
echo "$(grep "$1" "$2" 2>/dev/null |awk -v tag=$1 'BEGIN{FS=tag} {print $2}' 2>/dev/null |sed 's/,.*//' 2>/dev/null |sed 's/\}.*//' 2>/dev/null |sed 's/^ \{0,\}//g' 2>/dev/null |sed 's/ \{0,\}$//g' 2>/dev/null)"
}
for n in $line

View File

@ -80,7 +80,7 @@ provider_count=1
cfg_get()
{
echo "$(grep "$1" "$2" 2>/dev/null |awk -v tag=$1 'BEGIN{FS=tag} {print $2}' 2>/dev/null |sed 's/,.*//' 2>/dev/null |sed 's/^ \{0,\}//g' 2>/dev/null |sed 's/ \{0,\}$//g' 2>/dev/null |sed 's/ \{0,\}\}\{0,\}$//g' 2>/dev/null)"
echo "$(grep "$1" "$2" 2>/dev/null |awk -v tag=$1 'BEGIN{FS=tag} {print $2}' 2>/dev/null |sed 's/,.*//' 2>/dev/null |sed 's/\}.*//' 2>/dev/null |sed 's/^ \{0,\}//g' 2>/dev/null |sed 's/ \{0,\}$//g' 2>/dev/null)"
}
echo "开始更新【$CONFIG_NAME】的代理集配置..." >$START_LOG