forked from ipinfo/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added powershell scripts to download
- Loading branch information
Showing
10 changed files
with
185 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
$VSN = "1.0.0" | ||
|
||
# build the filename for the Zip archive and exe file | ||
$FileName ="cidr2ip_$($VSN)_windows_amd64" | ||
$ZipFileName = "$($FileName).zip" | ||
|
||
# download and extract zip | ||
Invoke-WebRequest -Uri "https://github.com/cidr2ip/cli/releases/download/cidr2ip-$VSN/$FileName.zip" -OutFile ./$ZipFileName | ||
Unblock-File ./$ZipFileName | ||
Expand-Archive -Path ./$ZipFileName -DestinationPath $env:LOCALAPPDATA\cidr2ip -Force | ||
|
||
# delete if already exists | ||
if (Test-Path "$env:LOCALAPPDATA\cidr2ip\cidr2ip.exe") { | ||
Remove-Item "$env:LOCALAPPDATA\cidr2ip\cidr2ip.exe" | ||
} | ||
Rename-Item -Path "$env:LOCALAPPDATA\cidr2ip\$FileName.exe" -NewName "cidr2ip.exe" | ||
|
||
# setting up env. and cleaning files | ||
[System.Environment]::SetEnvironmentVariable("PATH", $Env:Path + ";$env:LOCALAPPDATA\cidr2ip", "Machine") | ||
$env:PATH="$env:PATH;$env:LOCALAPPDATA\cidr2ip" | ||
Remove-Item -Path ./$ZipFileName | ||
"You can use cidr2ip now" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
$VSN = "1.2.0" | ||
|
||
# build the filename for the Zip archive and exe file | ||
$FileName ="cidr2range_$($VSN)_windows_amd64" | ||
$ZipFileName = "$($FileName).zip" | ||
|
||
# download and extract zip | ||
Invoke-WebRequest -Uri "https://github.com/cidr2range/cli/releases/download/cidr2range-$VSN/$FileName.zip" -OutFile ./$ZipFileName | ||
Unblock-File ./$ZipFileName | ||
Expand-Archive -Path ./$ZipFileName -DestinationPath $env:LOCALAPPDATA\cidr2range -Force | ||
|
||
# delete if already exists | ||
if (Test-Path "$env:LOCALAPPDATA\cidr2range\cidr2range.exe") { | ||
Remove-Item "$env:LOCALAPPDATA\cidr2range\cidr2range.exe" | ||
} | ||
Rename-Item -Path "$env:LOCALAPPDATA\cidr2range\$FileName.exe" -NewName "cidr2range.exe" | ||
|
||
# setting up env. and cleaning files | ||
[System.Environment]::SetEnvironmentVariable("PATH", $Env:Path + ";$env:LOCALAPPDATA\cidr2range", "Machine") | ||
$env:PATH="$env:PATH;$env:LOCALAPPDATA\cidr2range" | ||
Remove-Item -Path ./$ZipFileName | ||
"You can use cidr2range now" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
$VSN = "1.2.1" | ||
|
||
# build the filename for the Zip archive and exe file | ||
$FileName ="grepip_$($VSN)_windows_amd64" | ||
$ZipFileName = "$($FileName).zip" | ||
|
||
# download and extract zip | ||
Invoke-WebRequest -Uri "https://github.com/grepip/cli/releases/download/grepip-$VSN/$FileName.zip" -OutFile ./$ZipFileName | ||
Unblock-File ./$ZipFileName | ||
Expand-Archive -Path ./$ZipFileName -DestinationPath $env:LOCALAPPDATA\grepip -Force | ||
|
||
# delete if already exists | ||
if (Test-Path "$env:LOCALAPPDATA\grepip\grepip.exe") { | ||
Remove-Item "$env:LOCALAPPDATA\grepip\grepip.exe" | ||
} | ||
Rename-Item -Path "$env:LOCALAPPDATA\grepip\$FileName.exe" -NewName "grepip.exe" | ||
|
||
# setting up env. and cleaning files | ||
[System.Environment]::SetEnvironmentVariable("PATH", $Env:Path + ";$env:LOCALAPPDATA\grepip", "Machine") | ||
$env:PATH="$env:PATH;$env:LOCALAPPDATA\grepip" | ||
Remove-Item -Path ./$ZipFileName | ||
"You can use grepip now" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
$VSN = "2.6.1" | ||
|
||
# build the filename for the Zip archive and exe file | ||
$FileName ="ipinfo_$($VSN)_windows_amd64" | ||
$ZipFileName = "$($FileName).zip" | ||
|
||
# download and extract zip | ||
Invoke-WebRequest -Uri "https://github.com/ipinfo/cli/releases/download/ipinfo-$VSN/$FileName.zip" -OutFile ./$ZipFileName | ||
Unblock-File ./$ZipFileName | ||
Expand-Archive -Path ./$ZipFileName -DestinationPath $env:LOCALAPPDATA\ipinfo -Force | ||
|
||
# delete if already exists | ||
if (Test-Path "$env:LOCALAPPDATA\ipinfo\ipinfo.exe") { | ||
Remove-Item "$env:LOCALAPPDATA\ipinfo\ipinfo.exe" | ||
} | ||
Rename-Item -Path "$env:LOCALAPPDATA\ipinfo\$FileName.exe" -NewName "ipinfo.exe" | ||
|
||
# setting up env. and cleaning files | ||
[System.Environment]::SetEnvironmentVariable("PATH", $Env:Path + ";$env:LOCALAPPDATA\ipinfo", "Machine") | ||
$env:PATH="$env:PATH;$env:LOCALAPPDATA\ipinfo" | ||
Remove-Item -Path ./$ZipFileName | ||
"You can use ipinfo now" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
$VSN = "1.0.0" | ||
|
||
# build the filename for the Zip archive and exe file | ||
$FileName ="prips_$($VSN)_windows_amd64" | ||
$ZipFileName = "$($FileName).zip" | ||
|
||
# download and extract zip | ||
Invoke-WebRequest -Uri "https://github.com/prips/cli/releases/download/prips-$VSN/$FileName.zip" -OutFile ./$ZipFileName | ||
Unblock-File ./$ZipFileName | ||
Expand-Archive -Path ./$ZipFileName -DestinationPath $env:LOCALAPPDATA\prips -Force | ||
|
||
# delete if already exists | ||
if (Test-Path "$env:LOCALAPPDATA\prips\prips.exe") { | ||
Remove-Item "$env:LOCALAPPDATA\prips\prips.exe" | ||
} | ||
Rename-Item -Path "$env:LOCALAPPDATA\prips\$FileName.exe" -NewName "prips.exe" | ||
|
||
# setting up env. and cleaning files | ||
[System.Environment]::SetEnvironmentVariable("PATH", $Env:Path + ";$env:LOCALAPPDATA\prips", "Machine") | ||
$env:PATH="$env:PATH;$env:LOCALAPPDATA\prips" | ||
Remove-Item -Path ./$ZipFileName | ||
"You can use prips now" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
$VSN = "1.1.0" | ||
|
||
# build the filename for the Zip archive and exe file | ||
$FileName ="randip_$($VSN)_windows_amd64" | ||
$ZipFileName = "$($FileName).zip" | ||
|
||
# download and extract zip | ||
Invoke-WebRequest -Uri "https://github.com/randip/cli/releases/download/randip-$VSN/$FileName.zip" -OutFile ./$ZipFileName | ||
Unblock-File ./$ZipFileName | ||
Expand-Archive -Path ./$ZipFileName -DestinationPath $env:LOCALAPPDATA\randip -Force | ||
|
||
# delete if already exists | ||
if (Test-Path "$env:LOCALAPPDATA\randip\randip.exe") { | ||
Remove-Item "$env:LOCALAPPDATA\randip\randip.exe" | ||
} | ||
Rename-Item -Path "$env:LOCALAPPDATA\randip\$FileName.exe" -NewName "randip.exe" | ||
|
||
# setting up env. and cleaning files | ||
[System.Environment]::SetEnvironmentVariable("PATH", $Env:Path + ";$env:LOCALAPPDATA\randip", "Machine") | ||
$env:PATH="$env:PATH;$env:LOCALAPPDATA\randip" | ||
Remove-Item -Path ./$ZipFileName | ||
"You can use randip now" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
$VSN = "1.2.0" | ||
|
||
# build the filename for the Zip archive and exe file | ||
$FileName ="range2cidr_$($VSN)_windows_amd64" | ||
$ZipFileName = "$($FileName).zip" | ||
|
||
# download and extract zip | ||
Invoke-WebRequest -Uri "https://github.com/range2cidr/cli/releases/download/range2cidr-$VSN/$FileName.zip" -OutFile ./$ZipFileName | ||
Unblock-File ./$ZipFileName | ||
Expand-Archive -Path ./$ZipFileName -DestinationPath $env:LOCALAPPDATA\range2cidr -Force | ||
|
||
# delete if already exists | ||
if (Test-Path "$env:LOCALAPPDATA\range2cidr\range2cidr.exe") { | ||
Remove-Item "$env:LOCALAPPDATA\range2cidr\range2cidr.exe" | ||
} | ||
Rename-Item -Path "$env:LOCALAPPDATA\range2cidr\$FileName.exe" -NewName "range2cidr.exe" | ||
|
||
# setting up env. and cleaning files | ||
[System.Environment]::SetEnvironmentVariable("PATH", $Env:Path + ";$env:LOCALAPPDATA\range2cidr", "Machine") | ||
$env:PATH="$env:PATH;$env:LOCALAPPDATA\range2cidr" | ||
Remove-Item -Path ./$ZipFileName | ||
"You can use range2cidr now" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
$VSN = "1.0.0" | ||
|
||
# build the filename for the Zip archive and exe file | ||
$FileName ="range2ip_$($VSN)_windows_amd64" | ||
$ZipFileName = "$($FileName).zip" | ||
|
||
# download and extract zip | ||
Invoke-WebRequest -Uri "https://github.com/range2ip/cli/releases/download/range2ip-$VSN/$FileName.zip" -OutFile ./$ZipFileName | ||
Unblock-File ./$ZipFileName | ||
Expand-Archive -Path ./$ZipFileName -DestinationPath $env:LOCALAPPDATA\range2ip -Force | ||
|
||
# delete if already exists | ||
if (Test-Path "$env:LOCALAPPDATA\range2ip\range2ip.exe") { | ||
Remove-Item "$env:LOCALAPPDATA\range2ip\range2ip.exe" | ||
} | ||
Rename-Item -Path "$env:LOCALAPPDATA\range2ip\$FileName.exe" -NewName "range2ip.exe" | ||
|
||
# setting up env. and cleaning files | ||
[System.Environment]::SetEnvironmentVariable("PATH", $Env:Path + ";$env:LOCALAPPDATA\range2ip", "Machine") | ||
$env:PATH="$env:PATH;$env:LOCALAPPDATA\range2ip" | ||
Remove-Item -Path ./$ZipFileName | ||
"You can use range2ip now" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters