Skip to content

dev_Installing

Xmetalfanx edited this page Sep 2, 2025 · 5 revisions

Installing Applications

Installing from Repos

installApp function

The idea is that once a repo (if a third party repo... say a PPA) is added, this would install the software in question

Goals/Description

  • Arguments taken:

    • it take an unlimited amount of arguments.
    • it DOES display out those arguments in a line similar "Installing <arguments here>"
  • Function tasks:

    • it uses the $install var to install the selected package

      • $install is assigned based on the pmanager variable
        • this is basically the detected distro's default way of installing from the default repos (or close enough... say ubuntu where a user can add repos ... this would still be "apt install ")
    • Checking for software installed already:

      • This will check the list of apps and only install those not detected as installed already
  • Personal Comments

    • Best used when:

      • I think this is best when installing something from a default repo or AFTER the needed sources (PPA? RPMFusion? Pacman repo?) are added already.
    • IMPORTANT NOTE:

      • I cant remember why this is the case but each argument in the list passed to installApp has to be in seperate double quotes for the checking part of installApp
        • ... otherwise it's all detected as one single string, I think.

$install variable

  • This is based on the package manager detected
    • Examples
      • Arch Linux/Manjaro
        • sudo pacman -S
      • Debian/Ubuntu
        • sudo apt install
      • Fedora
        • sudo dnf install
      • OpenSuse
        • sudo zypper install
      • Solus
        • sudo eopkg install
  • How to use:
    • all that has to be done is $install <package name>

Installing third-party Apps

(Sept 2025 addition) things are not done yet but here is the idea

There are two function that can be called

  • metaExternalDownload
    • Downloads and handles tarballs, DEBs, RPMs, and other files
    • This is the main one to call from "software functions" except for the case below
  • get_and_handle_github_downlaods
    • (function name may change)
    • this checks to see if its a valid repo
      • this then uses info and filters to get the github download when a git clone is NOT desired.
        • (having $programURL or $program_url when i change the cases, being a "https://github.... .git" link would trigger the git clone)
    • after a few checks for different ways that repos may have "releases" (not all do the same),
    • THEN the program_URL is passed to metaExternalDownload

Clone this wiki locally