Last active
July 22, 2023 09:52
-
-
Save tadd/7c26f08d7c966fadfc93394575e15424 to your computer and use it in GitHub Desktop.
I can (not) update everything of my Debian system at once.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# First of all, there is one bad news: you cannot update everything in this script. | |
# Below is my current status and methods. | |
# | |
# * System pacakges: apt update && apt upgrade | |
# * Firmware: fwupdgmr refresh && fwupdgmr update | |
# * Chrome, Firefox, and Thunderbird: they won't be updated unless booted (maybe?) | |
# if you installed binary from upstreams | |
# * Emacs itself: using distro's package | |
# * Node.js: 3rd party's APT repositry https://github.com/nodesource/distributions | |
# * But you'll need to edit the source file for every major-update | |
# * Ruby: `git pull && make` (just my preference) | |
# * TeXLive itself: manual installation annually https://www.tug.org/texlive/ | |
# * Zoom, bat, delta, ...: automated with local APT repository | |
# * See https://github.com/tadd/local-apt-repos | |
# Anyway, let's get started. | |
v() { | |
label="$1: " | |
"$@" 2>&1 |sed "/^${label}/!s/^/${label}/g" | |
} | |
# Emacs packages, requires `auto-pacakge-update` package | |
v emacs --batch -u $USER -f auto-package-update-now & | |
# Ruby: gems | |
(v gem update --system && v gem update && v gem clean) & | |
# TeXLive: LaTeX pacakges | |
v tlmgr update --self --all & | |
# JavaScript: npms | |
v npm --no-progress -g update & | |
# Rust: toolchain and `cargo install`-ed packages, needs crate `cargo-update` | |
(v rustup self update && v rustup update && v cargo install-update -a) & | |
# Rust (again): update single binary `rust-analyzer` with my local script | |
which update-rust-analyzer >/dev/null && v update-rust-analyzer & | |
# Flatpaks | |
v flatpak update -y & | |
# Everything is started, time will solve everything. | |
# It may take a long time, so now you can have some tea or coffee. | |
wait | |
# Well done! You did hard work. | |
# But I'd like to add one thing: what the hell?? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment