AutoO_release / Backup /Utils /padd.ps1
luicl's picture
Upload folder using huggingface_hub
72b02e4 verified
Raw History Blame Contribute Delete
626 Bytes
if ($PSScriptRoot) { Set-Location $PSScriptRoot }
$currentDir = $PWD.Path
$adb = Join-Path $currentDir "platform-tools-latest-windows\platform-tools"
$oldPath = [Environment]::GetEnvironmentVariable("Path", "User")
$list = $oldPath -split ";" | Where-Object { $_ -ne "" }
$list = $list | Where-Object {
$_ -ne $currentDir -and
$_ -notlike "*platform-tools*"
}
$targets = @($currentDir, $adb)
foreach ($p in $targets) {
if ($p -and (Test-Path $p)) {
$list += $p
}
}
$newPath = $list -join ";"
[Environment]::SetEnvironmentVariable("Path", $newPath, "User")
$currentDir
$adb