Sync common files - 2022-07-29

This commit is contained in:
Urs Roesch
2022-07-29 19:16:13 +02:00
parent c22074ce61
commit 9a081cf3ff
2 changed files with 16 additions and 7 deletions
+6 -1
View File
@@ -2,7 +2,7 @@
# Description: Common classes and functions for portable apps powershell
# scripts
# Author: Urs Roesch <github@bun.ch>
# Version: 0.9.4
# Version: 0.9.5
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
@@ -160,6 +160,11 @@ Function Download-Checksum() {
# Multiline file with file name suffix
Return $Line -replace "^($Pattern)\s+\*?$File", "`$1"
}
"^$Pattern\s+.+/$File$" {
# Multiline file with multiple entries e.g. putty
# 2f49ec1e6c35e10c.... w32/putty.zip
Return $Line -replace "^($Pattern)\s+.*", "`$1"
}
default {
Debug debug "No match in line '$Line'"
}
+10 -6
View File
@@ -37,7 +37,7 @@ Param(
# -----------------------------------------------------------------------------
# Globals
# -----------------------------------------------------------------------------
$Version = "0.0.35-alpha"
$Version = "0.0.36-alpha"
$Debug = $True
# -----------------------------------------------------------------------------
@@ -214,10 +214,13 @@ Function Update-Application() {
}
# -----------------------------------------------------------------------------
Function Postinstall() {
$Postinstall = "$PSScriptRoot\Postinstall.ps1"
If (Test-Path $Postinstall) {
. $Postinstall
Function Source-InstallScript() {
Param(
[String] $Mode
)
$Script = "$PSScriptRoot\$Mode.ps1"
If (Test-Path $Script) {
. $Script
}
}
@@ -325,8 +328,9 @@ Function Invoke-Helper() {
# Main
# -----------------------------------------------------------------------------
$Config = Read-IniFile -IniFile $UpdateIni
Source-InstallScript Preinstall
Update-Application
Update-Appinfo
Postinstall
Source-InstallScript Postinstall
Create-Launcher
Create-Installer