Implement "Add/remove all from configuration" package conflict resolution strategy #1

Merged
jutty merged 5 commits from all-in-configuration-strategy into main 2024-07-14 12:27:51 +02:00
3 changed files with 7 additions and 2 deletions
Showing only changes of commit e95eefe666 - Show all commits

View file

@ -1,3 +1,5 @@
0.4.1 2024-07-14: Fixes "Cancel" option not exiting on package resolution
Fixes whitespace preventing package list matches on "remove all"
0.4.0 2024-07-14: "Add/remove all from configuration" resolution strategy
0.3.1 2024-07-13: Refactor, new docs page, make cache refresh lazier
0.3.0 2024-07-11: "Enter packages to install/uninstall" resolution strategy

View file

@ -9,7 +9,10 @@ track_packages() {
untrack_packages() {
local packages="$1"
log debug "[untrack_packages] Removing packages: $packages"
echo "$packages" | xargs | sed 's/ /\n/g' | while read -r package; do
sed -i '' "/^$package$/d" "$CONFIG_ROOT/packages"
sed -i '' "/^[[:space:]]*$package[[:space:]]*$/d" "$CONFIG_ROOT/packages"
log debug "[untrack_packages] Executed removal for $package with exit code $?"
done
}

2
tori
View file

@ -2,7 +2,7 @@
main() {
# paths
VERSION="0.4.0 2024-07-14"
VERSION="0.4.1 2024-07-14"
TORI_ROOT="$HOME/.local/share/tori"
CONFIG_ROOT="$HOME/.config/tori"
TMP_DIR="/tmp/tori"