"Decide-in-editor" package conflict resolution strategy #2

Merged
jutty merged 6 commits from editor-package-resolution-strategy into main 2024-07-20 22:04:29 +02:00
4 changed files with 16 additions and 6 deletions
Showing only changes of commit a6142163af - Show all commits

View file

@ -8,9 +8,9 @@ package_manager() {
local args__get_manually_installed
local args__get_available
set_opts +
set_opts off
local args__user_args="$2"
set_opts -
set_opts on
if [ "$OS" = "FreeBSD" ]; then
manager="pkg"

View file

@ -1,7 +1,7 @@
update_package_cache() {
set_opts +
set_opts off
local argument="$1"
set_opts -
set_opts on
if [ -f "$PACKAGE_CACHE" ]; then
local last_update="$(date -r "$PACKAGE_CACHE" +%Y-%m-%d)"

View file

@ -44,7 +44,17 @@ log() {
}
set_opts() {
sign="$1"
local target="$1"
local sign=
if [ "$target" = on ]; then
sign='-'
elif [ "$target" = off ]; then
sign='+'
else
log fatal "Invalid set_opts target: $target. Expected on or off"
return 1
fi
set_opt() {
local opt="$1"

2
tori
View file

@ -21,7 +21,7 @@ main() {
check_core_paths
. "$TORI_ROOT/src/index.sh"
set_opts -
set_opts on
## os-dependent state
OS="$(get_operating_system)"