-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.ps1
More file actions
38 lines (30 loc) · 1.14 KB
/
setup.ps1
File metadata and controls
38 lines (30 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Write-Host "=============================="
Write-Host " GuardSense - Setup de Keystore (Windows)"
Write-Host "=============================="
$KeystoreDir = "$env:LOCALAPPDATA\guardsense\keystore"
$KeystoreName = "release.jks"
$KeystorePath = "$KeystoreDir\$KeystoreName"
$PropertiesFile = ".\app\keystore.properties"
Write-Host "-> Criando diretório..."
New-Item -ItemType Directory -Force -Path $KeystoreDir | Out-Null
Write-Host "-> Copiando keystore..."
Copy-Item ".\$KeystoreName" $KeystorePath -Force
Write-Host "-> Solicitando senhas..."
$StorePassword = Read-Host "Digite a storePassword"
$KeyPassword = Read-Host "Digite a keyPassword"
$KeyAlias = Read-Host "Digite o keyAlias (padrão: release)"
if ([string]::IsNullOrWhiteSpace($KeyAlias)) {
$KeyAlias = "release"
}
Write-Host "-> Criando keystore.properties..."
@"
storeFile=$KeystorePath
storePassword=$StorePassword
keyAlias=$KeyAlias
keyPassword=$KeyPassword
"@ | Out-File $PropertiesFile -Encoding UTF8
Write-Host "=============================="
Write-Host " Setup concluído!"
Write-Host " Keystore instalada em:"
Write-Host " $KeystorePath"
Write-Host "=============================="