mirror of
https://github.com/uroesch/GitPortable.git
synced 2026-08-24 10:04:09 -05:00
Sync common files - 2022-07-29
This commit is contained in:
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user