X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;f=bat%2Finstall.ps1;h=44e0feebd1a28ef898901b97da2074bbc1f21e8c;hb=894562bc0c2e40cfdc36ee3ca293a354a04786d0;hp=c324a86fe51b692c7726eaf5257e7bd38955d163;hpb=b944f3cb2597fac8225446ba9fbc110790c59c74;p=webi-installers%2F.git diff --git a/bat/install.ps1 b/bat/install.ps1 index c324a86..44e0fee 100644 --- a/bat/install.ps1 +++ b/bat/install.ps1 @@ -3,12 +3,12 @@ $VERNAME = "$Env:PKG_NAME-v$Env:WEBI_VERSION.exe" $EXENAME = "$Env:PKG_NAME.exe" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\$Env:WEBI_PKG_FILE")) +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { # TODO: arch detection - echo "Downloading $Env:PKG_NAME from $Env:WEBI_PKG_URL to $Env:USERPROFILE\Downloads\$Env:WEBI_PKG_FILE" - & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$Env:USERPROFILE\Downloads\$Env:WEBI_PKG_FILE.part" - & move "$Env:USERPROFILE\Downloads\$Env:WEBI_PKG_FILE.part" "$Env:USERPROFILE\Downloads\$Env:WEBI_PKG_FILE" + echo "Downloading $Env:PKG_NAME from $Env:WEBI_PKG_URL to $Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" + & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE.part" + & move "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE.part" "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" } IF (!(Test-Path -Path "$Env:USERPROFILE\.local\xbin\$VERNAME")) @@ -24,8 +24,8 @@ IF (!(Test-Path -Path "$Env:USERPROFILE\.local\xbin\$VERNAME")) # Unpack archive # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $Env:USERPROFILE\Downloads\$Env:WEBI_PKG_FILE" - & tar xf "$Env:USERPROFILE\Downloads\$Env:WEBI_PKG_FILE" + echo "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 "bat-*\$EXENAME" "$VERNAME"