From 816c8ce33ebbfb96fd40d504400be80556f5af8d Mon Sep 17 00:00:00 2001 From: issaclin32 Date: Wed, 21 Aug 2019 23:26:48 +0800 Subject: [PATCH] cmder, cmder-full: modify persist (#360) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add persistence for `config` and `vendor\conemu-maximus5\ConEmu.xml` - Update hash extraction Co-Authored-By: Jakub Čábera Co-authored-by: Ross Smith II --- bucket/cmder-full.json | 18 +++++++++++++----- bucket/cmder.json | 18 +++++++++++++----- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/bucket/cmder-full.json b/bucket/cmder-full.json index 5ae796658c..d1845b11e6 100644 --- a/bucket/cmder-full.json +++ b/bucket/cmder-full.json @@ -1,11 +1,15 @@ { - "homepage": "http://cmder.net", - "description": "Portable console emulator for Windows", + "homepage": "https://cmder.net", + "description": "Portable console emulator for Windows. (Full version)", "version": "1.3.12", "license": "MIT", - "persist": "config", "url": "https://github.com/cmderdev/cmder/releases/download/v1.3.12/cmder.7z", "hash": "dfed85b5fb5fa09d9eedaf8c92978c73170165e98b2358630b5d0e22fc2eeef4", + "pre_install": [ + "if (!(Test-Path \"$persist_dir\\vendor\\conemu-maximus5\\ConEmu.xml\")) {", + " Copy-Item \"$dir\\vendor\\ConEmu.xml.default\" \"$dir\\vendor\\conemu-maximus5\\ConEmu.xml\"", + "}" + ], "bin": "Cmder.exe", "shortcuts": [ [ @@ -13,6 +17,10 @@ "Cmder" ] ], + "persist": [ + "config", + "vendor\\conemu-maximus5\\ConEmu.xml" + ], "env_set": { "CMDER_ROOT": "$dir", "ConEmuDir": "$dir\\vendor\\conemu-maximus5" @@ -23,8 +31,8 @@ "autoupdate": { "url": "https://github.com/cmderdev/cmder/releases/download/v$version/cmder.7z", "hash": { - "url": "https://github.com/cmderdev/cmder/releases/download/v$version/hashes.txt", - "find": "$basename\\s+([A-Fa-f\\d]{64})" + "url": "$baseurl/hashes.txt", + "regex": "$basename\\s+$sha256" } } } diff --git a/bucket/cmder.json b/bucket/cmder.json index 1dcb527c08..0479086632 100644 --- a/bucket/cmder.json +++ b/bucket/cmder.json @@ -1,11 +1,15 @@ { - "homepage": "http://cmder.net", - "description": "Portable console emulator for Windows", + "homepage": "https://cmder.net", + "description": "Portable console emulator for Windows. (Mini version)", "version": "1.3.12", "license": "MIT", - "persist": "config", "url": "https://github.com/cmderdev/cmder/releases/download/v1.3.12/cmder_mini.zip", "hash": "328ccf3bd768c4b88249bcea3f7c3cf558eb348a94a20d61b88906e2ea772c39", + "pre_install": [ + "if (!(Test-Path \"$persist_dir\\vendor\\conemu-maximus5\\ConEmu.xml\")) {", + " Copy-Item \"$dir\\vendor\\ConEmu.xml.default\" \"$dir\\vendor\\conemu-maximus5\\ConEmu.xml\"", + "}" + ], "bin": "Cmder.exe", "shortcuts": [ [ @@ -13,6 +17,10 @@ "Cmder" ] ], + "persist": [ + "config", + "vendor\\conemu-maximus5\\ConEmu.xml" + ], "env_set": { "CMDER_ROOT": "$dir", "ConEmuDir": "$dir\\vendor\\conemu-maximus5" @@ -23,8 +31,8 @@ "autoupdate": { "url": "https://github.com/cmderdev/cmder/releases/download/v$version/cmder_mini.zip", "hash": { - "url": "https://github.com/cmderdev/cmder/releases/download/v$version/hashes.txt", - "find": "$basename\\s+([A-Fa-f\\d]{64})" + "url": "$baseurl/hashes.txt", + "regex": "$basename\\s+$sha256" } } }