aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorfelinae982020-08-05 09:49:40 +0800
committerfelinae982020-08-05 09:49:40 +0800
commit841a047cabe7c8e52c97c0e431e302cf9c70fdcf (patch)
treea58d729117fd2009ec52a80c6e9e811b798cc46b
parentadcd774382e7a44b89da38211329f18b5ad82c8e (diff)
downloadaur-841a047cabe7c8e52c97c0e431e302cf9c70fdcf.tar.gz
insert custom rule to first
-rw-r--r--.SRCINFO6
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD6
-rwxr-xr-xclashup3
4 files changed, 9 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d98ae1df435d..34be51da63fe 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = clashup
pkgdesc = auto update clash's config file
- pkgver = 0.1
- pkgrel = 3
+ pkgver = 0.2.1
+ pkgrel = 1
url = https://github.com/felinae98/clashup
arch = any
license = GPL
@@ -10,7 +10,7 @@ pkgbase = clashup
depends = python-requests
source = clashup
source = clashup.conf
- md5sums = 0e7c428edc816942248cc9dedd5b6b30
+ md5sums = c94bf9a47483488b688b130ac36665b0
md5sums = 177338346005e11d33e27edc1f8ab780
pkgname = clashup
diff --git a/.gitignore b/.gitignore
index 6e5ec0890804..0647f8081ef7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
pkg/*
src/*
-*.tar.xz \ No newline at end of file
+*.tar.xz
+*.tar.zst
diff --git a/PKGBUILD b/PKGBUILD
index f3e8f959bfcd..ae733383c066 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Tang Yuming <felinae225@qq.com>
pkgname=clashup
-pkgver=0.1
-pkgrel=3
+pkgver=0.2.1
+pkgrel=1
pkgdesc="auto update clash's config file"
license=('GPL')
arch=('any')
@@ -14,5 +14,5 @@ package() {
install -Dm755 clashup ${pkgdir}/usr/bin/clashup
install -Dm644 clashup.conf ${pkgdir}/etc/systemd/user/clash.service.d/clashup.conf
}
-md5sums=('0e7c428edc816942248cc9dedd5b6b30'
+md5sums=('c94bf9a47483488b688b130ac36665b0'
'177338346005e11d33e27edc1f8ab780')
diff --git a/clashup b/clashup
index 2a0c0cfe8b41..88212de76da4 100755
--- a/clashup
+++ b/clashup
@@ -69,8 +69,7 @@ class ClashUp:
self._load_conf(config, 'redir_port', 'redir-port')
self._load_conf(config, 'allow_lan', 'allow-lan')
self._load_conf(config, 'external_controller', 'external-controller')
- for rule in self.config.get('custom_rules', []):
- config['rules'].append(rule)
+ config['rules'] = self.config.get('custom_rules', []) + config.get('rules', [])
return config
def save(self, config):