Skip to content

A powershell script that handle upgrades for several package managers at one time.

Notifications You must be signed in to change notification settings

AndreasBrostrom/win-upgrade

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

win-upgrade

Release Build Version Pre release and or current build version Dev-build or the latest tag of the current build. win-upgrade Downloads win-upgrade Issues

Windows upgrade or Upgrade for short are a update script written in powershell. The script look for your package managers including WSL ones and update them.

To run the script make sure your PS1 file is placed in a location in your path and that you are allowed to run scripts.

To run the script make sure the script location is placed in your windows $PATH variable. (For a real terminal super user feeling.) But you can also just run the script.

The script can detect:

PS > upgrade --help     
Usage: upgrade [-w] [-su] [-v] [-help]

    -h, --help                Show this help
    -w, --noWindowsUpdate     Disable update check for windows
    -su, --suMode             Disable suMode and require sudo password on a user level for wsl update. This may lead to required confirms.

    --updateWSL               Upgrade WSL client

    -v, --version             Show current version

Note! When using a sudo windows script i recommend you using lukesampson sudo simply run scoop install sudo.

Install

  1. Create a .bin directory in your home directory and make sure it added to your $PATH environment variable.
    PS> New-Item -itemtype "directory" -path "$env:userprofile\.bin" -Force
    PS> [Environment]::SetEnvironmentVariable("Path", $env:Path + ";$env:userprofile\.bin", "User")
  2. Download latest release (Can be found here)
    PS> $version=(irm 'https://api.github.com/repos/AndreasBrostrom/win-upgrade/releases/latest' | Select tag_name).tag_name
    PS> iwr -URI "https://github.com/AndreasBrostrom/win-upgrade/releases/download/$version/upgrade-$version.zip" -OutFile "$env:userprofile/Downloads/upgrade-latest.zip"
  3. Unzip latest release
    PS> Expand-Archive "$env:userprofile\Downloads\upgrade-latest.zip" -DestinationPath "$env:userprofile\.bin"
    PS> Remove-Item "$env:userprofile\.bin\README.md"
  4. Run
    PS> upgrade