[Other] Update scripts

This commit is contained in:
Connection Refused
2021-10-16 13:07:33 +08:00
parent d84476025b
commit 63355965f3
5 changed files with 10 additions and 27 deletions

View File

@@ -1,16 +1,12 @@
param (
[string]
$OutputPath
)
Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent)
try {
Invoke-WebRequest `
-Uri 'https://raw.githubusercontent.com/17mon/china_ip_list/master/china_ip_list.txt' `
-OutFile 'chnip.txt'
-OutFile '..\release\chnip.txt'
}
catch {
exit 1
}
mv -Force 'chnip.txt' $OutputPath
exit 0

View File

@@ -1,7 +1,4 @@
param (
[string]
$OutputPath
)
Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent)
try {
Invoke-WebRequest `
@@ -21,7 +18,6 @@ foreach ( $data in (Get-Content -Path 'chnsite.txt') ) {
Add-Content -Path 'newsite.txt' -Value $data
}
}
mv -Force 'newsite.txt' 'chnsite.txt'
mv -Force 'chnsite.txt' $OutputPath
mv -Force 'newsite.txt' '..\release\chnsite.txt'
exit 0

View File

@@ -1,7 +1,4 @@
param (
[string]
$OutputPath
)
Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent)
try {
Invoke-WebRequest `
@@ -12,5 +9,5 @@ catch {
exit 1
}
mv -Force 'geoip.dat' $OutputPath
mv -Force 'geoip.dat' '..\release\geoip.dat'
exit 0

View File

@@ -1,7 +1,4 @@
param (
[string]
$OutputPath
)
Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent)
try {
Invoke-WebRequest `
@@ -12,5 +9,5 @@ catch {
exit 1
}
mv -Force 'geosite.dat' $OutputPath
mv -Force 'geosite.dat' '..\release\geosite.dat'
exit 0

View File

@@ -1,7 +1,4 @@
param (
[string]
$OutputPath
)
Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent)
try {
Invoke-WebRequest `
@@ -15,7 +12,7 @@ catch {
7z x 'wintun.zip'
if ( -Not $? ) { exit $lastExitCode }
mv -Force 'wintun\bin\amd64\wintun.dll' $OutputPath
mv -Force 'wintun\bin\amd64\wintun.dll' '..\release\wintun.dll'
rm -Recurse -Force 'wintun'
rm -Recurse -Force 'wintun.zip'