This commit is contained in:
vczh
2026-02-11 00:20:57 -08:00
parent a543a8f6e4
commit afe084fc60
8 changed files with 393 additions and 5 deletions
+21 -2
View File
@@ -1,9 +1,28 @@
# Prepare Copilot workspace files
param(
[switch]$Backup
[switch]$Backup,
[switch]$Earliest
)
if (@($Backup, $Earliest).Where({ $_ }).Count -gt 1) {
throw "At most one switch can be true: -Backup, -Earliest."
}
if ($Earliest) {
$learningRoot = Resolve-Path -LiteralPath "$PSScriptRoot\..\Learning"
$earliestFolder = Get-ChildItem -LiteralPath $learningRoot -Directory |
Sort-Object -Property Name |
Select-Object -First 1
if ($null -eq $earliestFolder) {
throw "No folder is found in '$learningRoot'."
}
Write-Output $earliestFolder.FullName
exit 0
}
# Create or override the markdown files with the specified content
$filesToOverride = @{
"Copilot_Planning.md" = "# !!!PLANNING!!!"
@@ -84,4 +103,4 @@ if ($Backup) {
}
}
Write-Host "Copilot preparation completed."
Write-Host "Copilot preparation completed."