|
| 1 | +<# |
| 2 | +Open ■ |
| 3 | +┬────┴ Restore-Dependencies |
| 4 | +■ KNX 2024 OpenKNX - Erkan Çolak |
| 5 | +
|
| 6 | +FILEPATH: restore/Restore-Dependencies-Branch.ps1 |
| 7 | +#> |
| 8 | + |
| 9 | +param( |
| 10 | + # Set the Git checkout mode |
| 11 | + [ValidateSet("Branch", "Hash")] |
| 12 | + [string]$GitCheckoutMode = "Branch", # Default is Branch |
| 13 | + |
| 14 | + # Force the script to recreate symbolic links |
| 15 | + [switch]$ForceRecreateSymLinks = $true, # Default is $true |
| 16 | + |
| 17 | + # "dependencies.txt" file |
| 18 | + [string]$DependenciesFile = "dependencies.txt", # Default is "dependencies.txt" |
| 19 | + |
| 20 | + # Check for privileges (Windows only) |
| 21 | + [switch]$CheckForDeveloperMode = $true, # Default is $true |
| 22 | + [switch]$CheckForSymbolicLinkPermissions = $true, # Default is $true |
| 23 | + [switch]$CheckForAdminOnly = $false, # Default is $false |
| 24 | + |
| 25 | + # Set the Write-Host message behavior |
| 26 | + [switch]$Verbose = $false, # Default is $false |
| 27 | + [switch]$DebugMsg = $false # Default is $false |
| 28 | +) |
| 29 | + |
| 30 | +# Construct the command to invoke Restore-Dependencies.ps1 |
| 31 | +$command = ".\Restore-Dependencies.ps1" + |
| 32 | + " -GitCheckoutMode $GitCheckoutMode" + |
| 33 | + " -ForceRecreateSymLinks:$ForceRecreateSymLinks" + |
| 34 | + " -DependenciesFile $DependenciesFile" + |
| 35 | + " -CheckForDeveloperMode:$CheckForDeveloperMode" + |
| 36 | + " -CheckForSymbolicLinkPermissions:$CheckForSymbolicLinkPermissions" + |
| 37 | + " -CheckForAdminOnly:$CheckForAdminOnly" + |
| 38 | + " -Verbose:$Verbose" + |
| 39 | + " -DebugMsg:$DebugMsg" |
| 40 | + |
| 41 | +# Execute the command |
| 42 | +Invoke-Expression $command |
0 commit comments