this post was submitted on 27 Apr 2024
39 points (85.5% liked)

Linux

48193 readers
1922 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
top 6 comments
sorted by: hot top controversial new old
[–] BeatTakeshi@lemmy.world 21 points 6 months ago* (last edited 6 months ago)

Someone to read your prompt

Someone who cares

[–] d3Xt3r@lemmy.nz 5 points 6 months ago* (last edited 6 months ago) (1 children)
[–] sebastiancarlos@lemmy.sdf.org 12 points 6 months ago* (last edited 6 months ago)

Tbh these scripts are for my personal use, written in the way that makes sense for me. I only open sourced it as a joke an as an example of how reinventing your own wheel is not that hard sometimes, and comes with the benefit of doing just what you need it to do.

Actually I was thinking of adding a sysget fallback, as I might need to do some debian/fedora hacking soon.

[–] thingsiplay@beehaw.org 3 points 6 months ago (1 children)

For such a project, I think a different structure would make more sense. A structure where each supported package manager is a module on its own (like module/pacman.sh) and contains all the logic for this specific package manager. Those modules would only contain functions. And the main script with the main logic and loads in the module would not know or check what package manager it uses, but instead just runs the functions that are named the same in each module. But that would obviously require a major rewrite.

[–] sebastiancarlos@lemmy.sdf.org 2 points 6 months ago* (last edited 6 months ago)

Makes sense and you're probably right, but I'll tell you why I didn't do it that way:

  1. I just did what came first to me
  2. I like the idea of the API defining the project structure
  3. When adding a new package manager, if that ever happens, I would like to see all other implementation of the same functionality on the same file, for help and inspiration
[–] Frederic@beehaw.org 2 points 6 months ago

I'm using nala (it's on top of apt) and it's pretty enough