summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGzxhwq2022-03-23 15:57:52 +0800
committerGzxhwq2022-03-23 15:57:52 +0800
commit8e631c1748916817e0ec1a1148fe9a6a6564eb61 (patch)
tree21283dcc65a23568bb13f4a059714fd3deae5381
parentbd6c91bcd6d891bf192b281f672bef25723497f4 (diff)
downloadaur-8e631c1748916817e0ec1a1148fe9a6a6564eb61.tar.gz
Fixed symbolic links and restric the working directory of update script.
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD10
-rwxr-xr-xv2ray-rules-dat-autoupdate5
3 files changed, 14 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 96d703255a14..8746e2dee2f9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = v2ray-rules-dat-autoupdate
pkgdesc = Enhanced edition of V2Ray and Xray rules dat files, compatible with Trojan-Go. Automaitcally update.
- pkgver = 1.2
+ pkgver = 1.3
pkgrel = 1
url = https://github.com/Loyalsoldier/v2ray-rules-dat
install = v2ray-rules-dat-autoupdate.install
@@ -24,15 +24,15 @@ pkgbase = v2ray-rules-dat-autoupdate
conflicts = v2ray-geoip-custom
conflicts = v2ray-rules-dat-git
conflicts = vxray-rules-dat-git
- source = rules-202201022210.zip::https://github.com/Loyalsoldier/v2ray-rules-dat/releases/download/202201022210/rules.zip
+ source = rules-202203222210.zip::https://github.com/Loyalsoldier/v2ray-rules-dat/releases/download/202203222210/rules.zip
source = v2ray-rules-dat-autoupdate
source = v2ray-rules-dat-autoupdate.install
source = v2ray-rules-dat-autoupdate.sysusers
source = v2ray-rules-dat-autoupdate.tmpfiles
source = v2ray-rules-dat-autoupdate.service
source = v2ray-rules-dat-autoupdate.timer
- sha256sums = ea0a3eb27b9c14f53cb6922b05194b2f575d0bf35b1f8781bcdef28208f354e5
- sha256sums = fed8eef3df1799a7e7919396eb3f2f1da6c03d3b950c8601e723ddb27db8d7f7
+ sha256sums = 5adb8414c6cdc889c53049524c551fab99e0e7c5fdea9599247a2087c6f92802
+ sha256sums = 48d824f149fddadf512a2a3705ec82216036becb0e013ae663ccf7ffe16998ab
sha256sums = d5deeb9e02b2cf6e233da4369bb7d74e06054bd54ee9e62875f3342d7c931dbd
sha256sums = 5d0fac85c93516f45281f3e45071f4f98c4a9eadfbd72602129c888c823b79ef
sha256sums = ea8090be783d0d60f441d25ddad9686b75e5b8405311cc21d29235e80b1671b7
diff --git a/PKGBUILD b/PKGBUILD
index 3dde640ad300..9adc405433c0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=v2ray-rules-dat-autoupdate
_pkgname=v2ray-rules-dat
pkgdesc="Enhanced edition of V2Ray and Xray rules dat files, compatible with Trojan-Go. Automaitcally update."
-pkgver=1.2
+pkgver=1.3
pkgrel=1
arch=('any')
url="https://github.com/Loyalsoldier/v2ray-rules-dat"
@@ -26,7 +26,7 @@ source=("rules-${tag}.zip"::"${url}/releases/download/${tag}/rules.zip"
"${pkgname}.timer")
sha256sums=($(curl -sL "${url}/releases/download/${tag}/rules.zip.sha256sum" | awk '{print $1}')
- 'fed8eef3df1799a7e7919396eb3f2f1da6c03d3b950c8601e723ddb27db8d7f7'
+ '48d824f149fddadf512a2a3705ec82216036becb0e013ae663ccf7ffe16998ab'
'd5deeb9e02b2cf6e233da4369bb7d74e06054bd54ee9e62875f3342d7c931dbd'
'5d0fac85c93516f45281f3e45071f4f98c4a9eadfbd72602129c888c823b79ef'
'ea8090be783d0d60f441d25ddad9686b75e5b8405311cc21d29235e80b1671b7'
@@ -46,8 +46,10 @@ package() {
mkdir -p "${pkgdir}/usr/share/"{v2ray,xray}
- ln -sf "/var/lib/${_pkgname}/"*.dat "${pkgdir}/usr/share/v2ray/"
- ln -sf "/var/lib/${_pkgname}/"*.dat "${pkgdir}/usr/share/xray/"
+ ln -sf "/var/lib/${_pkgname}/"geosite.dat "${pkgdir}/usr/share/v2ray/"
+ ln -sf "/var/lib/${_pkgname}/"geoip.dat "${pkgdir}/usr/share/v2ray/"
+ ln -sf "/var/lib/${_pkgname}/"geosite.dat "${pkgdir}/usr/share/xray/"
+ ln -sf "/var/lib/${_pkgname}/"geoip.dat "${pkgdir}/usr/share/xray/"
install -Dm755 "./${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
install -Dm644 "./${pkgname}.sysusers" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
diff --git a/v2ray-rules-dat-autoupdate b/v2ray-rules-dat-autoupdate
index 66ae30495d13..0439816e993d 100755
--- a/v2ray-rules-dat-autoupdate
+++ b/v2ray-rules-dat-autoupdate
@@ -7,13 +7,16 @@ GitHub="https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download
JsDelivr="https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release"
download_files() {
+
+ cd /var/lib/v2ray-rules-dat || exit
+
echo "Fetching rules.zip"
curl -LO "${1}/rules.zip{,.sha256sum}"
sha256sum --check "rules.zip.sha256sum"
bsdtar -xf ./rules.zip
- rm -vf $(find . -maxdepth 1 -type f ! -name "geo*.dat")
+ rm -vf $(find . -maxdepth 1 -type f ! \( -name "geo*.dat" -o -name "\.*" \))
}
case "${1}" in