Update with a single command

birolaydin

Birol AYDIN

Posted on November 10, 2024

Update with a single command

Instead of doing the updates one by one via the command line, let's do them all with a single command.

When installing Deno and TypeScript, we use the following commands respectively. If we consider that there are more and add that we run them one by one... Instead, let's write a small script with PowerShell to make our job easier.

irm https://deno.land/install.ps1 | iex
Enter fullscreen mode Exit fullscreen mode
npm install -g typescript@next
Enter fullscreen mode Exit fullscreen mode
# .\script.ps1

# Bun update
powershell -c "irm https://bun.sh/install.ps1 | iex"
Write-Output "`e[1;32mBun was installed successfully!`n`n`e[0m"


# Deno update
Invoke-RestMethod https://deno.land/install.ps1 | Invoke-Expression
Write-Output "`e[1;32mDeno was installed successfully!`n`n`e[0m"

# Typescript update
npm install -g typescript@next
Write-Output "`e[1;32mTypeScript was installed successfully!`n`n`e[0m"

# Rust ( nightly toolchain ) update
rustup toolchain install nightly
Write-Output "`e[1;32mRust was installed successfully!`n`n`e[0m"
Enter fullscreen mode Exit fullscreen mode

powershell script

💖 💊 🙅 ðŸšĐ
birolaydin
Birol AYDIN

Posted on November 10, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related