<# FPS:Containers:Make:SC-Reconcile:ACTIVE
#>
if (!(Push-NeededFor Reconcile)) {
# Remove a prior patch if it already exists
Remove-Item -Path Function:\Reconcile
} else {
# Only load the help line if a prior release is not
present, otherwise just keep whats there.
$genShortcuts = @($genShortcuts
(ConvertTo-DotFill $global:SCDotLen 'Reconcile')+"[Switches(o): -Sync] Performs a cloud FileCabinet sync with the primary on DESKTOP-A9GTPL1."
)
}
function Reconcile {
<#
.DESCRIPTION
Module: Make
Shortcut: SC-Reconcile.ps1
Has Dependencies: Yes
This CmdLet encapsulates the
process of syncing a directory with the directory on DESKTOP-A9GTPL1
as configured within the poller
- or interactively.
.EXAMPLE
if (Push-NeededFor SC-Reconcile) { .
(Get-ActiveFileNm -PS1 SC-Reconcile)
}
Reconcile -Sync
-or-
# If you want to just get info on what the action would
do.
Reconcile
.CC
[2025.03.16 JD] Original code release
.NOTES
#>
[CmdletBinding()]
param(
[Parameter(Mandatory=$false)] [switch]$Sync
)
#region Initialization
$testCmdLet, $overrideTestSnippet, $overrideSnippet = "", "", "" # Initialize override variables
. (Get-ActiveFileNm -PS1 Initialize-Make-Locations)
. (Get-ActiveFileNm -PS1 Load-Make-Dependencies)
#endregion
if ($global:Pro_CI.CI -ne $makLoc_ReconcileCurrentCI) {
Write-Host ("This process can only run on "+$makLoc_ReconcileCurrentCI+".")
return
} else {
$Source, $Target = $makLoc_ReconcileTransitional, $makLoc_ReconcileCurrent
if ($PSBoundParameters.Sync -eq $true) {
Sync-FileCabinet -Source $Source -Target $Target -Sync
} else {
Sync-FileCabinet -Source $Source -Target $Target
}
}
}