This repository has been archived by the owner on Feb 18, 2021. It is now read-only.
forked from flofreud/posh-gvm
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathposh-gvm.psm1
55 lines (44 loc) · 1.52 KB
/
posh-gvm.psm1
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<#
posh-gvm / POwerSHell Groovy enVironment Manager
https://github.com/flofreud/posh-gvm
Needed:
- Powershell 3.0 (For Windows 7 install Windows Management Framework 3.0)
#>
#region Config
if ( !(Test-Path Variable:Global:PGVM_DIR) ) {
$Global:PGVM_DIR = "$env:USERPROFILE\.posh_gvm"
}
if ( !(Test-Path Variable:Global:PGVM_AUTO_ANSWER) ) {
$Global:PGVM_AUTO_ANSWER = $false
}
if ( !(Test-Path Variable:Global:PGVM_AUTO_SELFUPDATE) ) {
$Global:PGVM_AUTO_SELFUPDATE = $false
}
$Script:PGVM_INIT = $false
$Script:PGVM_SERVICE = 'http://api.sdkman.io'
$Script:PGVM_BROADCAST_SERVICE = 'http://cast.sdkman.io'
$Script:GVM_BASE_VERSION = '1.3.13'
$Script:PGVM_CANDIDATES_PATH = "$Global:PGVM_DIR\.meta\candidates.txt"
$Script:PGVM_BROADCAST_PATH = "$Global:PGVM_DIR\.meta\broadcast.txt"
$Script:GVM_API_VERSION_PATH = "$Global:PGVM_DIR\.meta\version.txt"
$Script:PGVM_ARCHIVES_PATH = "$Global:PGVM_DIR\.meta\archives"
$Script:PGVM_TEMP_PATH = "$Global:PGVM_DIR\.meta\tmp"
$Script:GVM_API_NEW_VERSION = $false
$Script:PGVM_NEW_VERSION = $false
$Script:PGVM_VERSION_PATH = "$psScriptRoot\VERSION.txt"
$Script:PGVM_VERSION_SERVICE = "https://raw.githubusercontent.com/flofreud/posh-gvm/master/VERSION.txt"
$Script:GVM_AVAILABLE = $true
$Script:GVM_ONLINE = $true
$Script:GVM_FORCE_OFFLINE = $false
$Script:GVM_CANDIDATES = $null
$Script:FIRST_RUN = $true
$Script:UNZIP_ON_PATH = $false
#endregion
Push-Location $psScriptRoot
. .\Utils.ps1
. .\Commands.ps1
. .\Init.ps1
. .\TabExpansion.ps1
Pop-Location
Init-Posh-Gvm
Export-ModuleMember 'gvm'