diff options
Diffstat (limited to 'v2ray-rules-dat-autoupdate')
-rwxr-xr-x | v2ray-rules-dat-autoupdate | 5 |
1 files changed, 4 insertions, 1 deletions
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 |