Browse Source

update: rule update script

master v1.3.1
dnomd343 2 years ago
parent
commit
6d0e031ded
  1. 5
      load.sh

5
load.sh

@ -158,10 +158,9 @@ EOF
load_update_script() {
cat > $ASSET_DIR/update.sh << "EOF"
VERSION=$(curl -sL "https://api.github.com/repos/Loyalsoldier/v2ray-rules-dat/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
mkdir temp/ && cd temp/
wget "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/download/$VERSION/geoip.dat"
wget "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/download/$VERSION/geosite.dat"
wget "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat"
wget "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat"
[ -s "geoip.dat" ] && mv -f geoip.dat ../
[ -s "geosite.dat" ] && mv -f geosite.dat ../
cd ../ && rm -rf temp/

Loading…
Cancel
Save