Compare commits
2 commits
202a0a8b0a
...
e0930075a6
Author | SHA1 | Date | |
---|---|---|---|
e0930075a6 | |||
87e1687831 |
5 changed files with 5 additions and 7 deletions
|
@ -7,4 +7,4 @@ The `packages` file is located at the root of the configuration directory and co
|
|||
|
||||
When processing the package list, `tori` will compare the list of installed packages to the list in the configuration and ask the user for what action to take in order to conciliate them, unless a default action has been specified.
|
||||
|
||||
For information on how the application determines differences between the configuration package list and the actually installed packages, see [`check`](check).
|
||||
For information on how the application determines differences between the configuration package list and installed packages, see [`check`](./check.md).
|
||||
|
|
|
@ -7,12 +7,12 @@ The two utility functions presently implemented are:
|
|||
|
||||
## `log`
|
||||
|
||||
This utilitiy takes a log level as its first argument and a message as its second argument. The log message must be wrapped in double quotes, otherwise only the first world will be considered part of the message and the rest will be discarded.
|
||||
This utility takes a log level as its first argument and a message as its second argument. The log message must be wrapped in double quotes, otherwise only the first word will be considered part of the message and the rest will be discarded.
|
||||
|
||||
The current log levels are:
|
||||
- `debug`: Displays only when `DEBUG` is set in the environment. The value `DEBUG` is set to does not matter. To disable the log messages, unset `DEBUG`, for example, with `export DEBUG=` or 'unset DEBUG`
|
||||
- `debug`: Displays only when `DEBUG` is set in the environment with a nanosecond-precision timestamp. The value `DEBUG` is set to does not matter. To disable the log messages, unset `DEBUG`, for example, with `export DEBUG=` or `unset DEBUG`
|
||||
- `user`: Always displays, with `[tori]` at the very left followed by a second-precision timestamp, a colon and the message
|
||||
- `fatal`: Always displays, exactly as `user`
|
||||
- `fatal`: Always displays, exactly as in the `user` level
|
||||
|
||||
For now, all log messages are printed to `STDERR` so as not to shadow function return values.
|
||||
|
||||
|
|
|
@ -17,14 +17,12 @@ package_manager() {
|
|||
|
||||
if [ "$command" = 'get_manually_installed' ]; then
|
||||
output=$(eval $manager $args__get_manually_installed)
|
||||
log debug "package.package_manager returning: $output"
|
||||
printf "$output"
|
||||
fi
|
||||
}
|
||||
|
||||
get_system_packages() {
|
||||
local packages=$(package_manager get_manually_installed)
|
||||
log debug "package.get_system_packages returning: $packages"
|
||||
printf "$packages"
|
||||
}
|
||||
|
||||
|
|
2
src/tori
2
src/tori
|
@ -6,7 +6,7 @@ CONFIG_ROOT="$HOME/.config/tori"
|
|||
TMP_DIR="/tmp/tori"
|
||||
|
||||
. "$TORI_ROOT/src/package.sh"
|
||||
. "$TORI_ROOT/src/utilities.sh"
|
||||
. "$TORI_ROOT/src/utility.sh"
|
||||
. "$TORI_ROOT/src/configuration.sh"
|
||||
|
||||
# state
|
||||
|
|
Loading…
Reference in a new issue