Alt account of @Badabinski

Just a sweaty nerd interested in software, home automation, emotional issues, and polite discourse about all of the above.

  • 0 Posts
  • 10 Comments
Joined 2 years ago
cake
Cake day: June 9th, 2024

help-circle

  • For those who (like me) have never heard of this distro:

    aerynOS (“erinOS”) is an independent Linux distribution being built from the ground up with its own tooling. We are developing an atomic operating system which supports both declarative and imperative system management approaches, and offers rollback capabilities that help reduce the risk of system failure from unsuccessful or interrupted updates.

    and here’s part of their blurb about moss:

    moss looks and feels a lot like a regular package manager, however it actually manages the entire operating system via content addressable storage. Every single file from every package is deduplicated via a hash-based addressing scheme in the moss store, allowing us to produce new system roots on the fly.









  • For future reference, you should remove set -euo pipefail and then add manual error handling to all commands which could fail. set -euo pipefail is one of the biggest, most disgusting foot guns in bash (a shit language cursed with many horrible foot guns) and does nothing but mask your problems. If every command has a unique error message, then you can much more easily track down your problems.

    To make things more ergonomic, remove the foot gun and add a die function that accepts an error message and optional exit code and calls it like this:

    echoerr() { echo "$@" 1>&2; }
    
    die() {
      message="$1"; shift
      exit_code="${1:-1}"
      echoerr "$message"
      exit "$exit_code"
    }
    
    fallible_command || die 'shit is so fucked yo'
    

    source: bash was my first language and I’ve been dealing with its bullshit personally and professionally for over 13 years now.