• flying_sheep@lemmy.ml
    link
    fedilink
    arrow-up
    11
    arrow-down
    4
    ·
    8 months ago

    Services are bash scripts?

    Oh no. That’s horrifying. I’ll never go back to the bad old days where my system constantly has dozens of untestable buggy bash scripts running.

    I currently have zero bash scripts running on my system until I open steam, and there’s no world where I’d go back.

      • flying_sheep@lemmy.ml
        link
        fedilink
        arrow-up
        8
        arrow-down
        2
        ·
        8 months ago

        POSIX shells are horrible unmaintainable bug factories.

        shellcheck is not enough to make them safe programming languages. They are acceptable only in an interactive context.

        Having anything encourage people to write POSIXy shell scripts is a design flaw.

        • lemmyreader@lemmy.mlOP
          link
          fedilink
          English
          arrow-up
          5
          arrow-down
          1
          ·
          8 months ago

          Continue your ranting on some OpenBSD (uses /bin/ksh in init scripts) mailing list ?

          • flying_sheep@lemmy.ml
            link
            fedilink
            arrow-up
            4
            arrow-down
            1
            ·
            edit-2
            8 months ago

            I don’t think those are better or worse. My point isn’t about some ancient far too limiting standard, but about how easy it is to wreck everything by not knowing some obscure syntactical rule. My issue is about implicit conversion between strings and arrays, about silently swallowing errors and so on. And the only shell languages that I know aren’t idiotic are nushell and Powershell.

            That KDE theme that nuked some user’s home directory? Used a bash script. That time the bumblebee graphics card switching utility deleted /var? Bash script. Any time some build system broke because of a space in a path: bash/ZSH/… script.

            Why would anyone make an init system based on shell scripts these days?