diff --git a/scripts/deps/chnip.ps1 b/Other/chnip/build.ps1 similarity index 57% rename from scripts/deps/chnip.ps1 rename to Other/chnip/build.ps1 index 8245c488..f5d70b90 100644 --- a/scripts/deps/chnip.ps1 +++ b/Other/chnip/build.ps1 @@ -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 \ No newline at end of file diff --git a/scripts/deps/chnsite.ps1 b/Other/chnsite/build.ps1 similarity index 77% rename from scripts/deps/chnsite.ps1 rename to Other/chnsite/build.ps1 index 91ee8240..66d6d828 100644 --- a/scripts/deps/chnsite.ps1 +++ b/Other/chnsite/build.ps1 @@ -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 \ No newline at end of file diff --git a/scripts/deps/geoip.ps1 b/Other/geoip/build.ps1 similarity index 59% rename from scripts/deps/geoip.ps1 rename to Other/geoip/build.ps1 index 3200cea1..c0d35474 100644 --- a/scripts/deps/geoip.ps1 +++ b/Other/geoip/build.ps1 @@ -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 \ No newline at end of file diff --git a/scripts/deps/geosite.ps1 b/Other/geosite/build.ps1 similarity index 61% rename from scripts/deps/geosite.ps1 rename to Other/geosite/build.ps1 index 64c42244..f8c0019d 100644 --- a/scripts/deps/geosite.ps1 +++ b/Other/geosite/build.ps1 @@ -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 \ No newline at end of file diff --git a/scripts/deps/wintun.ps1 b/Other/wintun/build.ps1 similarity index 65% rename from scripts/deps/wintun.ps1 rename to Other/wintun/build.ps1 index 8d0b8e94..a9e2ea4e 100644 --- a/scripts/deps/wintun.ps1 +++ b/Other/wintun/build.ps1 @@ -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'