mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-08-21 21:16:29 +00:00
fix(fd): handle both old and new archive layouts in install.ps1
- Bare fd.exe (old layout) - fd-v*\fd.exe (new layout with versioned directory)
This commit is contained in:
+7
-1
@@ -24,7 +24,13 @@ if (!(Test-Path -Path "$Env:USERPROFILE\.local\bin\$VERNAME")) {
|
||||
Write-Output "Unpacking $Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE"
|
||||
& tar xf "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE"
|
||||
# Move single binary into root of temporary folder
|
||||
& Move-Item "$Env:WEBI_PKG_FILE\$EXENAME" "$VERNAME"
|
||||
# Handle both old layout (bare fd.exe) and new layout (fd-v*\fd.exe)
|
||||
if (Test-Path -Path ".\$EXENAME") {
|
||||
& Move-Item "$EXENAME" "$VERNAME"
|
||||
}
|
||||
elseif (Test-Path -Path ".\$Env:PKG_NAME-*\$EXENAME") {
|
||||
& Move-Item ".\$Env:PKG_NAME-*\$EXENAME" "$VERNAME"
|
||||
}
|
||||
|
||||
|
||||
# Settle unpacked archive into place
|
||||
|
||||
Reference in New Issue
Block a user