diff --git a/Setup-Profile.ps1 b/Setup-Profile.ps1 index 06d3865..8c9c4c4 100644 --- a/Setup-Profile.ps1 +++ b/Setup-Profile.ps1 @@ -3,7 +3,7 @@ [switch]$RemoveOnly, [switch]$ShowSkipped, [switch]$Force, - [switch]$GitClone, + [switch]$NoGitClone, [string]$GitURL = 'https://code.lksz.me/lksz/PowerShell_Scripts', [Parameter(DontShow)] [string]$MyPSScriptRoot = $MyPSScriptRoot @@ -15,7 +15,7 @@ function _Setup { [switch]$RemoveOnly, [switch]$ShowSkipped, [switch]$Force, - [switch]$GitClone, + [switch]$NoGitClone, [string]$GitURL = 'https://code.lksz.me/lksz/PowerShell_Scripts', [Parameter(DontShow)] [string]$MyPSScriptRoot = $MyPSScriptRoot) @@ -40,9 +40,9 @@ Get-Command Reload-MyScripts -ErrorAction SilentlyContinue | ForEach-Object { . ## _Setup Logic starts here ####################################################################### - if ( $GitClone -and -not (Test-Path $(Join-Path $MyPSScriptRoot '.git')) ) { + if ( -not $NoGitClone -and -not (Test-Path $(Join-Path $MyPSScriptRoot '.git')) ) { if ( -not [bool]$(Get-Command git -ErrorAction SilentlyContinue) ) { - throw "No git command found, you may either omit the -GitClone switch or install git and try again." + throw "No git command found, you may either omit run with the -NoGitClone switch or install git and try again." } if ( $PSCmdlet.ShouldProcess("Pull git repo from $GitURL into $MyPSScriptRoot ?") ) { Push-Location $MyPSScriptRoot @@ -59,7 +59,7 @@ Get-Command Reload-MyScripts -ErrorAction SilentlyContinue | ForEach-Object { . $GitOutput = "$(& git checkout --force)" Write-Verbose $GitOutput Pop-Location - Write-Verbose "-GitClone step done." + Write-Verbose "Git clone done." } }