Codebase list google-nexus-tools / run/bb1c5def-c8da-4965-932b-cdd3a402100c/upstream install.ps1
run/bb1c5def-c8da-4965-932b-cdd3a402100c/upstream

Tree @run/bb1c5def-c8da-4965-932b-cdd3a402100c/upstream (Download .tar.gz)

install.ps1 @run/bb1c5def-c8da-4965-932b-cdd3a402100c/upstreamraw · history · blame

# This script is just a wrapper to start the Dart executable from the GitHub releases page.

$Dir = "$Home\NexusTools"
$Arch = $ENV:Processor_Architecture
$BaseUrl = "https://github.com/corbindavenport/nexus-tools"
$Download = "$BaseUrl/releases/latest/download/nexustools-windows-x64.zip"

# Make the new directory
$dirCheck = Test-Path "$Dir"
if ($dirCheck) {
    # Do nothing
} else {
    # Create folder and hide output
    New-Item "$Dir" -ItemType Directory -ea 0 | Out-Null
}

# Start Dart executable
Invoke-WebRequest -Uri "$Download" -OutFile "$Dir\temp.zip"
Expand-Archive -LiteralPath "$Dir\temp.zip" -DestinationPath "$Dir" -Force
del "$Dir\temp.zip"
& "$Dir\nexustools.exe" -i -w