From fb7b2389c33bef903f236f4dd0c0b98dfc0bbbe8 Mon Sep 17 00:00:00 2001 From: ertopogo Date: Wed, 26 Nov 2025 04:02:41 +0100 Subject: Feat: Ajout de la configuration Tridactyl (Native Messenger + .tridactylrc) et scripts de maintenance --- scripts/cleanup-tridactyl.ps1 | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 scripts/cleanup-tridactyl.ps1 (limited to 'scripts/cleanup-tridactyl.ps1') diff --git a/scripts/cleanup-tridactyl.ps1 b/scripts/cleanup-tridactyl.ps1 new file mode 100644 index 0000000..e1c3c7e --- /dev/null +++ b/scripts/cleanup-tridactyl.ps1 @@ -0,0 +1,34 @@ +# Script de nettoyage et consolidation Tridactyl +$ErrorActionPreference = "Stop" + +$sourceDir = "$env:USERPROFILE\.tridactyl" +$targetDir = "$env:APPDATA\Mozilla\NativeMessagingHosts" +$exeName = "native_main.exe" + +Write-Host "=== Consolidation Tridactyl ===" -ForegroundColor Cyan + +# 1. Copier l'exécutable +if (Test-Path "$sourceDir\$exeName") { + Write-Host "Copie de $exeName vers $targetDir..." + Copy-Item -Path "$sourceDir\$exeName" -Destination "$targetDir\$exeName" -Force + Write-Host "OK" -ForegroundColor Green +} else { + Write-Warning "$exeName non trouvé dans $sourceDir" +} + +# 2. Vérifier que tout est bien là-bas +if ((Test-Path "$targetDir\$exeName") -and (Test-Path "$targetDir\tridactyl.json")) { + Write-Host "Les fichiers nécessaires sont bien dans $targetDir" -ForegroundColor Green + + # 3. Supprimer l'ancien dossier + if (Test-Path $sourceDir) { + Write-Host "Suppression du dossier inutile $sourceDir..." + Remove-Item -Path $sourceDir -Recurse -Force + Write-Host "Dossier supprimé." -ForegroundColor Green + } +} else { + Write-Error "La copie semble avoir échoué. Le dossier source n'a pas été supprimé par sécurité." +} + +Write-Host "Opération terminée." -ForegroundColor Cyan + -- cgit v1.2.3