Codebase list google-nexus-tools / run/41dd6829-71b8-4602-a82d-fbda012ba83c/main install.ps1
run/41dd6829-71b8-4602-a82d-fbda012ba83c/main

Tree @run/41dd6829-71b8-4602-a82d-fbda012ba83c/main (Download .tar.gz)

install.ps1 @run/41dd6829-71b8-4602-a82d-fbda012ba83c/mainraw · 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