-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPamux.EngTools_profile.ps1
47 lines (36 loc) · 1.34 KB
/
Pamux.EngTools_profile.ps1
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
$($MyInvocation.MyCommand.Source)
$global:EngTools_ScriptsRoot = "${global:EngTools_Root}\Scripts"
. "${global:EngTools_ScriptsRoot}\Debug.ps1"
. "${global:EngTools_ScriptsRoot}\Globals.ps1"
. "${global:EngTools_ScriptsRoot}\Aliases.ps1"
. "${global:EngTools_ScriptsRoot}\System.ps1"
. "${global:EngTools_ScriptsRoot}\Utils.ps1"
. "${global:EngTools_ScriptsRoot}\ExternalTools.ps1"
function DeployThisCodeAsProfile()
{
# THIS IS NOT A REAL FUNCTION, DO NOT CALL THIS
# THE CODE OF THIS FUNCTION SHOULD BE PUT INTO THE Location
# POINTED BY $PROFILE VARIABLE
#
# $PROFILE usually is: [Environment]::GetFolderPath("MyDocuments") + "\WindowsPowerShell\Microsoft.PowerShell_profile.ps1"
# e.g. :
# c:\Users\Baris\EngTools\Scripts\Microsoft.PowerShell_profile.ps1
# CUT FROM HERE
$($MyInvocation.MyCommand.Source)
$global:MyDocumentsRoot = [Environment]::GetFolderPath("MyDocuments")
$global:WorkspaceRoot = "${global:MyDocumentsRoot}\Workspace"
# Override as needed
$global:WorkspaceRoot = "D:\Workspace"
$global:EngTools_Root = "${global:WorkspaceRoot}\EngTools"
$global:EngTools_Profile = "${global:EngTools_Root}\Pamux.EngTools_profile.ps1"
. $global:EngTools_Profile
# CUT UNTIL HERE
}
function Main([string[]] $args)
{
SetGlobals
SetAliases
$env:PATH="${env:PATH};${env:SYSINTERNALS_ROOT}"
Set-Location ${global:WorkspaceRoot}
}
Main