Minor documentation fixes and rewordings

This commit is contained in:
Juno Takano 2024-06-30 19:29:23 -03:00
parent e0930075a6
commit d3b48f66b3
2 changed files with 5 additions and 5 deletions

View file

@ -1,15 +1,15 @@
The `check` option performs two tasks through the configuration processing functions available at `src/configuration.sh` The `check` option performs two tasks through the configuration processing functions available at `src/configuration.sh`
1. Traverse the configuration directory to assemble a file list containing full paths for both the `base` and `bkp` directories 1. Traversing the configuration directory to assemble a file list containing full paths for both the `base` and `bkp` directories
2. Compare the installed packages with the `packages` file at the root of the configuration directory 2. Comparing the installed packages with the `packages` file at the root of the configuration directory
The first task is currently accomplished by resorting to `find`. While this allows for cleaner code, it relies on a utility with variable behavior across operating systems. Given the simplicity of the query, a better option might be using a POSIX-compliant wildcard such as `.[!.]* ..?* *` to match the files directly (e.g., in a for loop). Another option that may provide both readability and portability is repeating the match, once for hidden file and once for non-hidden files. The first task is currently accomplished by resorting to `find`. While this allows for cleaner code, it relies on a utility with variable behavior across operating systems. Given the simplicity of the query, a better option might be using a POSIX-compliant wildcard such as `.[!.]* ..?* *` to match the files directly (e.g., in a for loop). Another option that may provide both readability and portability is repeating the match, once for hidden file and once for non-hidden files.
The second task is accomplished by resorting to the package management functions available at `src/package.sh`. The `package_manager` function abstracts the actualy package manager provided by the underlying system and provides an OS-independent way to query the current manually installed packages. The second task is accomplished by resorting to the package management functions available at `src/package.sh`. The `package_manager` function abstracts the actual package manager in the underlying system and provides an OS-independent way to query manually installed packages.
Through the parsed `packages` configuration file at the root of the configuration directory (`~/.config/tori/packages` by default), both package lists are sorted and deduplicated before they can be filtered by each other using `grep` inverted matching. Through the parsed `packages` configuration file at the root of the configuration directory (`~/.config/tori/packages` by default), both package lists are sorted and deduplicated before they can be filtered by each other using `grep` inverted matching.
This allows us to obtain both differences and display them to the user. If no resolution strategy has been configured, several options are displayed: This allows obtaining both differences and displaying them to the user. If no resolution strategy has been configured or passed through the command line interface, several options are displayed:
1. Install/uninstall all 1. Install/uninstall all
2. Enter packages to install/uninstall 2. Enter packages to install/uninstall

View file

@ -1,4 +1,4 @@
The utilities functions available at `src/utilities.sh` provide functionality that is either very simple in purpose or general to the whole application. The utilities functions available at `src/utility.sh` provide functionality that is either very simple in purpose or general to the whole application.
The two utility functions presently implemented are: The two utility functions presently implemented are: