template / commit
Added better logging to clean-install.ps1
default_config.go | 24 ++++++++++++++++++++---- scripts/clean-install.ps1 | 8 ++++++-- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/default_config.go b/default_config.go index d8d0f0d..74e7469 100644 --- a/default_config.go +++ b/default_config.go @@ -63,11 +63,27 @@ Today's notes "code . \"{{.Name}}\"", }, }, + // { + // Name: "work", + // Description: "Creates a folder in the c:/work folder in the format YYYY-MM-DD[-hh][-mm][-ss][-ProjectName]", + // OS: "Windows", + // Path: "C:/work", + // Type: FolderType, + // NamePatterns: []string{ + // "{{.Year}}-{{.Month}}-{{.Day}}{{if .ProjectName}}-{{.ProjectName}}{{end}}", + // "{{.Year}}-{{.Month}}-{{.Day}}-{{.Hour}}{{if .ProjectName}}-{{.ProjectName}}{{end}}", + // "{{.Year}}-{{.Month}}-{{.Day}}-{{.Hour}}-{{.Minute}}{{if .ProjectName}}-{{.ProjectName}}{{end}}", + // "{{.Year}}-{{.Month}}-{{.Day}}-{{.Hour}}-{{.Minute}}-{{.Second}}{{if .ProjectName}}-{{.ProjectName}}{{end}}", + // }, + // ScriptShell: "pwsh", + // PostScripts: []string{ + // "explorer \"{{.Path}}\"", + // }, + // }, { Name: "work", - Description: "Creates a folder in the c:/work folder in the format YYYY-MM-DD[-hh][-mm][-ss][-ProjectName]", - OS: "Windows", - Path: "C:/work", + Description: "Creates a folder in the ~/Work folder in the format YYYY-MM-DD[-hh][-mm][-ss][-ProjectName]", + Path: "~/Work", Type: FolderType, NamePatterns: []string{ "{{.Year}}-{{.Month}}-{{.Day}}{{if .ProjectName}}-{{.ProjectName}}{{end}}", @@ -77,7 +93,7 @@ Today's notes }, ScriptShell: "pwsh", PostScripts: []string{ - "explorer \"{{.Path}}\"", + "code \"{{.Path}}\"", }, }, { diff --git a/scripts/clean-install.ps1 b/scripts/clean-install.ps1 index e79e2ef..6891efb 100644 --- a/scripts/clean-install.ps1 +++ b/scripts/clean-install.ps1 @@ -1,9 +1,13 @@ $scriptPath = Split-Path -Path $MyInvocation.MyCommand.Path -Parent Set-Location "$scriptPath/.." +Write-Host "Installing..." go install -Remove-Item ~/.templates -Recurse -ErrorAction SilentlyContinue +Write-Host "Removing old templates folder..." +Remove-Item ~/.templates -Recurse -Force -ErrorAction Continue +Write-Host "Copying new templates folder..." Copy-Item .\templates -Destination ~/.templates -Recurse -Remove-Item ~/.template.yaml -ErrorAction SilentlyContinue \ No newline at end of file +Write-Host "Removing old config file..." +Remove-Item ~/.template.yaml -Force -ErrorAction Continue \ No newline at end of file