Initial Shijian Android source import
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$adbArguments = $args
|
||||
if ($adbArguments.Count -eq 0) {
|
||||
$adbArguments = @('devices', '-l')
|
||||
}
|
||||
|
||||
$toolchain = & (Join-Path $PSScriptRoot 'env.ps1')
|
||||
if (-not (Test-Path -LiteralPath $toolchain.Adb -PathType Leaf)) {
|
||||
throw "Missing Android platform-tools: $($toolchain.Adb)"
|
||||
}
|
||||
|
||||
Push-Location -LiteralPath $toolchain.Root
|
||||
try {
|
||||
& $toolchain.Adb @adbArguments
|
||||
$deviceExitCode = $LASTEXITCODE
|
||||
} finally {
|
||||
Pop-Location
|
||||
}
|
||||
exit $deviceExitCode
|
||||
Reference in New Issue
Block a user