<commit_before># Friendly PowerShell Execution Policy
# Set-ExecutionPolicy Unrestricted


# Use this snippet if corporate domain policies hijack your $HOME folder...
# Remove-Variable -Force HOME
# Set-Variable HOME "C:\Users\<NAME>"


# Downloads all system scripts and dependencies required by PowerShell environment...
# $githubPath: sysGitHub target dir, installation directory
Function Setup-Dependencies([string]$githubPath)
{
	if (!(Test-Path $githubPath)) { mkdir $githubPath }

	cd $githubPath

	git clone 'https://github.com/JeremySkinner/posh-hg.git'
	git clone 'https://github.com/dahlbyk/posh-git.git'
	git clone 'https://kbeckman@github.com/kbeckman/Scripts-Settings.git'
}


# START PROFILE SCRIPT

# Set necessary command line environment variables...
# [Ruby 1.9.3, Git, TortoiseHg, DiffMerge, NuGet, VirtualBox, Sysinternals Suite, 7-7ip, OpenSSL,
# MakeCert.exe]
$requiredPaths = @( ";C:\Ruby193\bin", 					
					";C:\Program Files (x86)\Git\cmd",
					";C:\Program Files\TortoiseHg",
					";C:\Program Files\SourceGear\Common\DiffMerge",
					";C:\Program Files (x86)\NuGet",
					";C:\Program Files\Oracle\VirtualBox", 
					";C:\Program Files (x86)\Sysinternals Suite", 
					";C:\Program Files\7-Zip",
					";C:\OpenSSL-Win32\bin",
					";C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin" )
					
foreach ($path in $requiredPaths)
{
	if (!($env:Path.Contains($path))) { $env:Path += $path }
}


# Setup local GitHub dependencies...
$sysGitHub 	= Join-Path $HOME "GitHub"
$sysScripts = Join-Path $sysGitHub "Scripts-Settings\PowerShell\FuncLib"	
if (!(Test-Path $sysGitHub )) 
{ 
	Setup-Dependencies $sysGitHub 
	Get-ChildItem $sysScripts | 
		ForEach-Object -Process { . (Join-Path $sysScripts $_.Name) }
	Setup-Git "<NAME>" "<EMAIL>"
}
else <commit_msg>PowerShell - profile script Git setup defaults<commit_after># Friendly PowerShell Execution Policy
# Set-ExecutionPolicy Unrestricted


# Use this snippet if corporate domain policies hijack your $HOME folder...
# Remove-Variable -Force HOME
# Set-Variable HOME "C:\Users\<NAME>"


# Downloads all system scripts and dependencies required by PowerShell environment...
# $githubPath: sysGitHub target dir, installation directory
Function Setup-Dependencies([string]$githubPath)
{
	if (!(Test-Path $githubPath)) { mkdir $githubPath }

	cd $githubPath

	git clone 'https://github.com/JeremySkinner/posh-hg.git'
	git clone 'https://github.com/dahlbyk/posh-git.git'
	git clone 'https://kbeckman@github.com/kbeckman/Scripts-Settings.git'
}


# START PROFILE SCRIPT

# Set necessary command line environment variables...
# [Ruby 1.9.3, Git, TortoiseHg, DiffMerge, NuGet, VirtualBox, Sysinternals Suite, 7-7ip, OpenSSL,
# MakeCert.exe]
$requiredPaths = @( ";C:\Ruby193\bin", 					
					";C:\Program Files (x86)\Git\cmd",
					";C:\Program Files\TortoiseHg",
					";C:\Program Files\SourceGear\Common\DiffMerge",
					";C:\Program Files (x86)\NuGet",
					";C:\Program Files\Oracle\VirtualBox", 
					";C:\Program Files (x86)\Sysinternals Suite", 
					";C:\Program Files\7-Zip",
					";C:\OpenSSL-Win32\bin",
					";C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin" )
					
foreach ($path in $requiredPaths)
{
	if (!($env:Path.Contains($path))) { $env:Path += $path }
}


# Setup local GitHub dependencies...
$sysGitHub 	= Join-Path $HOME "GitHub"
$sysScripts = Join-Path $sysGitHub "Scripts-Settings\PowerShell\FuncLib"	
if (!(Test-Path $sysGitHub )) 
{ 
	Setup-Dependencies $sysGitHub 
	Get-ChildItem $sysScripts | 
		ForEach-Object -Process { . (Join-Path $sysScripts $_.Name) }
	Setup-Git
}
else 
{'fraction_non_alphanumeric': 0.14983258928571427, 'fraction_numerical': 0.01171875, 'mean_word_length': 4.092329545454546, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1527826', 'n_tokens_mistral': 1368, 'n_tokens_neox': 1173, 'n_words': 283}