From 627d4ffc0b7000712c4b5b92a0bbcaeaeb93067b Mon Sep 17 00:00:00 2001 From: Brian <18603393+brian6932@users.noreply.github.com> Date: Wed, 11 Oct 2023 03:52:38 -0400 Subject: [PATCH] cotp: Add `persist`, make portable --- bucket/cotp.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bucket/cotp.json b/bucket/cotp.json index cae911f3b..bbd99b316 100644 --- a/bucket/cotp.json +++ b/bucket/cotp.json @@ -10,6 +10,12 @@ "extract_dir": "cotp-v1.3.0-x86_64-win-gnu" } }, + "pre_install": [ + "if (Test-Path \"$persist_dir\\db.cotp\") { return }", + "if (Test-Path ($default_path = \"$home\\.cotp\\db.cotp\")) { return New-Item -ItemType SymbolicLink -Path \"$dir\\db.cotp\" -Target $default_path | Out-Null }", + "New-Item \"$dir\\db.cotp\" | Out-Null" + ], + "persist": "db.cotp", "bin": "cotp.exe", "checkver": "github", "autoupdate": {