refactor(default-flatpaks): Switch to standardized BlueBuild location, implement useful docs into files & make flatpak detection + comparison more robust (#122)

* chore(default-flatpaks): Switch to standardized BlueBuild location

Use

`/usr/etc/bluebuild/default-flatpaks`

location instead of

`/usr/etc/flatpaks`

If possible, we should ideally use this location for system modifications:

`/usr/share/bluebuild/default-flatpaks`

While having user modifications in:

`/usr/etc/bluebuild/default-flatpaks`

But it needs to be figured out how the logic will work for separating system & user modifications this way.

I used this logic in unofficial `initramfs-setup` module & it works well, by merging both system & user files into 1 output.

However, this method can create duplicates if user specified it in it's modification, so I mentioned that user should look if the system entry has modifications they need. Perhaps, array diff can be done, which would circumvent this.

So merge this for start.

Only other module which has potential for migrating to standardized BlueBuild config is yafti (more details in other PR I'll do in some time).

* refactor(default-flatpaks): Make default-flatpaks more robust

Document in detail to user how he can change the config in files itself.

Also document what files do in `/usr/share/bluebuild/default-flatpaks` as well.

Refactor flatpak lists detection to be more reliable by excluding words starting with # symbols, whitelines & duplicate entries. Use `comm` for comparing flatpak list to existing flatpaks output instead of using `grep`, as it's easier to use & it's more reliable.

Separate user's & maintainer's modifications better by utilizing read-only `/usr/share/bluebuild/default-flatpaks` directory for maintainers, while for users we would use `(/usr)/etc/bluebuild/default-flatpaks` directory. Reverting to defaults is more reliable as it would avoid users from touching maintainer's modification directly.

I wouldn't modify repo-info.yml doc content, as we restrict it from user's modification & we wouldn't want to potentially ruin yaml parsing just for that.

Only thing that remains is to test this in a VM. And look to potentially make code cleaner.

* draft(default-flatpaks): Avoid install/remove duplicate loop scenario

I have to figure out this part

* draft(default-flatpaks): Avoid install/remove duplicate loop scenario pt.2

* draft(default-flatpaks): Avoid install/remove duplicate loop scenario pt.3

* fix(default-flatpaks): Avoid install/remove duplicate loop scenario

* chore(default-flatpaks): minor grammar adjustment

* draft(default-flatpaks): Account for scenario...

when user sets the same package in install list that is in maintainer's remove list & vice-versa

* fix(default-flatpaks): Account for scenario when user sets the same package in install list that is in maintainer's remove list & vice-versa

* fix(default-flatpaks): Typo in code for combined install list

* chore(default-flatpaks): Remove unnecessary echo

* chore(default-flatpaks): Make directory for user config

* chore(default-flatpaks): Explain user's vs maintainer's flatpak list situation better

* fix(default-flatpaks): Typo in user's configuration for system flatpaks install

* chore(default-flatpaks): There is no need to mkdir parent folder if child folder is created

* chore(default-flatpaks): Make config organization cleaner

Don't use echos for writing configs, use files instead for easier & more intuitive editing.

* fix(default-flatpaks): Copy notification file properly

Made a mistake in variable name

* docs: README fixes

- don't use ambiguous term "live-user"
- capitalize Flatpak
- grammar and phrasing changes

* docs: grammar and phrasing changes in configuration file docs

- replace "maintainer's config" with "image's default config"
- rewrite flatpak list format explanation

* docs: slightly reword local modification section again

* chore(default-flatpaks): Add a missing newline to system flatpak list

---------

Co-authored-by: xynydev
This commit is contained in:
fiftydinar 2024-02-11 10:33:05 +01:00 committed by GitHub
parent 85d3b6b8fd
commit 1e1197dd0b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 153 additions and 32 deletions

View file

@ -2,7 +2,7 @@
The `default-flatpaks` module can be used to install or uninstall Flatpaks from a configurable remote on every boot. It skips that operation if no changes are detected. This module first removes the Fedora Flatpaks remote and Flatpaks that come pre-installed in Fedora. A Flatpak remote is configured the first time the module is used, but it can be re-configured in subsequent usages of the module. If no Flatpak remote is specified, the module will default to using Flathub.
Flatpaks can either be installed system-wide or per-user. Per-user Flatpaks will be installed separetly for every user on a system. Previously-installed flatpaks can also be removed.
Flatpaks can either be installed system-wide or per-user. Per-user Flatpaks will be installed separately for every user on a system. Previously-installed flatpaks can also be removed.
The module uses the following scripts to handle flatpak setup:
@ -14,8 +14,16 @@ The scripts are run on every boot by these services:
- `/usr/lib/systemd/system/system-flatpak-setup.service`
- `/usr/lib/systemd/user/user-flatpak-setup-service`
`system-flatpak-setup` uninstalls Fedora flatpaks, replaces Fedora repos with your repo choice, checks the Flatpak install/remove lists created by the module & performs the install/uninstall operation according to that. `user-flatpak-setup` does the same things for user Flatpaks.
`system-flatpak-setup` uninstalls Fedora flatpaks, replaces Fedora repos with your repo choice, checks the Flatpak install/remove lists created by the module & performs the install/uninstall operation according to that. `user-flatpak-setup` does the same thing for user Flatpaks.
This module stores the Flatpak remote configuration and Flatpak install/remove lists in `/etc/flatpak/`. There are two subdirectories, `user` and `system` corresponding with the install level of the Flatpaks and repositories. Each directory has text files containing the IDs of flatpaks to `install` and `remove`, plus a `repo-info.yml` containing the details of the Flatpak repository.
This module stores the Flatpak remote configuration and Flatpak install/remove lists in `/usr/share/bluebuild/default-flatpaks/`. There are two subdirectories, `user` and `system` corresponding with the install level of the Flatpaks and repositories. Each directory has text files containing the IDs of flatpaks to `install` and `remove`, plus a `repo-info.yml` containing the details of the Flatpak repository.
This module also supports disabling & enabling notifications.
This module also supports disabling & enabling notifications.
## Local modification
If a local user is not satisfied with default Flatpak installations and removals in the image, it is possible for them to make modifications to the default configuration through the configuration files located within this directory:
`/etc/bluebuild/default-flatpaks/`
Folder structure is the same as talked about above, with `system` & `user` folders, `install` & `remove` files containing explanation on how those should be modified & what they do. The `notifications` file also contains this explanation for turning notifications on or off.

View file

@ -0,0 +1,3 @@
# This file contains the image's default configuration for `notifications` used by the the `default-flatpaks` module.
# Possible values: true, false

View file

@ -0,0 +1,3 @@
# This file contains the image's default configuration for `system flatpaks install` used by the `default-flatpaks` BlueBuild module.
# This list uses the Flatpak ID format, with one ID per line.

View file

@ -0,0 +1,3 @@
# This file contains the image's default configuration for `system flatpaks removal` used by the `default-flatpaks` BlueBuild module.
# This list uses the Flatpak ID format, with one ID per line.

View file

@ -0,0 +1,3 @@
# This file contains the image's default configuration for `user flatpaks install` used by the `default-flatpaks` BlueBuild module.
# This list uses the Flatpak ID format, with one ID per line.

View file

@ -0,0 +1,3 @@
# This file contains the image's default configuration for `user flatpaks removal` used by the `default-flatpaks` BlueBuild module.
# This list uses the Flatpak ID format, with one ID per line.

View file

@ -13,7 +13,7 @@ cp -r "$MODULE_DIRECTORY"/default-flatpaks/user-flatpak-setup.service /usr/lib/s
configure_flatpak_repo () {
CONFIG_FILE=$1
INSTALL_LEVEL=$2
REPO_INFO="/usr/etc/flatpak/$INSTALL_LEVEL/repo-info.yml"
REPO_INFO="/usr/share/bluebuild/default-flatpaks/$INSTALL_LEVEL/repo-info.yml"
get_yaml_array INSTALL ".$INSTALL_LEVEL.install[]" "$CONFIG_FILE"
@ -78,14 +78,13 @@ EOF
configure_lists () {
CONFIG_FILE=$1
INSTALL_LEVEL=$2
INSTALL_LIST="/usr/etc/flatpak/$INSTALL_LEVEL/install"
REMOVE_LIST="/usr/etc/flatpak/$INSTALL_LEVEL/remove"
INSTALL_LIST="/usr/share/bluebuild/default-flatpaks/$INSTALL_LEVEL/install"
REMOVE_LIST="/usr/share/bluebuild/default-flatpaks/$INSTALL_LEVEL/remove"
get_yaml_array INSTALL ".$INSTALL_LEVEL.install[]" "$CONFIG_FILE"
get_yaml_array REMOVE ".$INSTALL_LEVEL.remove[]" "$CONFIG_FILE"
echo "Creating $INSTALL_LEVEL Flatpak install list at $INSTALL_LIST"
if [[ ${#INSTALL[@]} -gt 0 ]]; then
touch $INSTALL_LIST
for flatpak in "${INSTALL[@]}"; do
echo "Adding to $INSTALL_LEVEL flatpak installs: $(printf ${flatpak})"
echo $flatpak >> $INSTALL_LIST
@ -94,7 +93,6 @@ configure_lists () {
echo "Creating $INSTALL_LEVEL Flatpak removals list $REMOVE_LIST"
if [[ ${#REMOVE[@]} -gt 0 ]]; then
touch $REMOVE_LIST
for flatpak in "${REMOVE[@]}"; do
echo "Adding to $INSTALL_LEVEL flatpak removals: $(printf ${flatpak})"
echo $flatpak >> $REMOVE_LIST
@ -103,23 +101,37 @@ configure_lists () {
}
echo "Enabling flatpaks module"
mkdir -p /usr/etc/flatpak/{system,user}
mkdir -p /usr/share/bluebuild/default-flatpaks/{system,user}
mkdir -p /usr/etc/bluebuild/default-flatpaks/{system,user}
systemctl enable -f system-flatpak-setup.service
systemctl enable -f --global user-flatpak-setup.service
# Check that `system` is present before configuring
# Check that `system` is present before configuring. Also copy template list files before writing Flatpak IDs.
if [[ ! $(echo "$1" | yq -I=0 ".system") == "null" ]]; then
configure_flatpak_repo "$1" "system"
cp -r "$MODULE_DIRECTORY"/default-flatpaks/config/system/install /usr/share/bluebuild/default-flatpaks/system/install
cp -r "$MODULE_DIRECTORY"/default-flatpaks/config/system/remove /usr/share/bluebuild/default-flatpaks/system/remove
configure_lists "$1" "system"
fi
# Check that `user` is present before configuring
# Check that `user` is present before configuring. Also copy template list files before writing Flatpak IDs.
if [[ ! $(echo "$1" | yq -I=0 ".user") == "null" ]]; then
configure_flatpak_repo "$1" "user"
cp -r "$MODULE_DIRECTORY"/default-flatpaks/config/user/install /usr/share/bluebuild/default-flatpaks/user/install
cp -r "$MODULE_DIRECTORY"/default-flatpaks/config/user/remove /usr/share/bluebuild/default-flatpaks/user/remove
configure_lists "$1" "user"
fi
echo "Configuring default-flatpaks notifications"
NOTIFICATIONS=$(echo "$1" | yq -I=0 ".notify")
NOTIFICATIONS_CONFIG_FILE="/usr/etc/flatpak/notifications"
echo "$NOTIFICATIONS" > "$NOTIFICATIONS_CONFIG_FILE"
CONFIG_NOTIFICATIONS="/usr/share/bluebuild/default-flatpaks/notifications"
cp -r "$MODULE_DIRECTORY"/default-flatpaks/config/notifications "$CONFIG_NOTIFICATIONS"
echo "$NOTIFICATIONS" >> "$CONFIG_NOTIFICATIONS"
echo "Copying user modification template files"
cp -r "$MODULE_DIRECTORY"/default-flatpaks/user-config/system/install /usr/etc/bluebuild/default-flatpaks/system/install
cp -r "$MODULE_DIRECTORY"/default-flatpaks/user-config/system/remove /usr/etc/bluebuild/default-flatpaks/system/remove
cp -r "$MODULE_DIRECTORY"/default-flatpaks/user-config/user/install /usr/etc/bluebuild/default-flatpaks/user/install
cp -r "$MODULE_DIRECTORY"/default-flatpaks/user-config/user/remove /usr/etc/bluebuild/default-flatpaks/user/remove
cp -r "$MODULE_DIRECTORY"/default-flatpaks/user-config/notifications /usr/etc/bluebuild/default-flatpaks/notifications

View file

@ -17,7 +17,7 @@ if grep -qz 'fedora' <<< "$(flatpak remotes)"; then
flatpak remove --system --noninteractive ${FEDORA_FLATPAKS[@]}
fi
REPO_INFO="/etc/flatpak/system/repo-info.yml"
REPO_INFO="/usr/share/bluebuild/default-flatpaks/system/repo-info.yml"
REPO_URL=$(yq '.repo-url' $REPO_INFO)
REPO_NAME=$(yq '.repo-name' $REPO_INFO)
REPO_TITLE=$(yq '.repo-title' $REPO_INFO)
@ -42,14 +42,34 @@ if [[ ! $REPO_TITLE == "null" ]]; then
fi
# Notifications config
NOTIFICATIONS=$(cat /etc/flatpak/notifications)
NOTIFICATIONS_FILE="/usr/share/bluebuild/default-flatpaks/notifications"
USER_NOTIFICATIONS_FILE="/etc/bluebuild/default-flatpaks/notifications"
# Ignore words starting with # symbol, whitelines & duplicate entries for notifications config
MAINTAINER_NOTIFICATIONS=$(cat "$NOTIFICATIONS_FILE" | grep -v -E '^#|^$' | awk '!seen[$0]++')
USER_NOTIFICATIONS=$(cat "$USER_NOTIFICATIONS_FILE" | grep -v -E '^#|^$' | awk '!seen[$0]++')
# If user modified notifications config, utilize user's configuration, otherwise maintainer's
if [[ -n $USER_NOTIFICATIONS ]]; then
NOTIFICATIONS="$USER_NOTIFICATIONS"
else
NOTIFICATIONS="$MAINTAINER_NOTIFICATIONS"
fi
# Installed flatpaks
FLATPAK_LIST=$(flatpak list --system --columns=application)
# Flatpak list files
INSTALL_LIST_FILE="/etc/flatpak/system/install"
REMOVE_LIST_FILE="/etc/flatpak/system/remove"
INSTALL_LIST_FILE="/usr/share/bluebuild/default-flatpaks/system/install"
REMOVE_LIST_FILE="/usr/share/bluebuild/default-flatpaks/system/remove"
USER_INSTALL_LIST_FILE="/etc/bluebuild/default-flatpaks/system/install"
USER_REMOVE_LIST_FILE="/etc/bluebuild/default-flatpaks/system/remove"
# Prefer user's install + remove list over maintainer's, in case when same flatpak ID is present in maintainer's install list + user's remove list & vice-versa
# Also ignores words starting with # symbol, whitelines & duplicate entries
MAINTAINER_INSTALL_LIST=$(comm -23 <(sort "$INSTALL_LIST_FILE") <(sort "$USER_REMOVE_LIST_FILE") | grep -v -E '^#|^$' | awk '!seen[$0]++')
MAINTAINER_REMOVE_LIST=$(comm -23 <(sort "$REMOVE_LIST_FILE") <(sort "$USER_INSTALL_LIST_FILE") | grep -v -E '^#|^$' | awk '!seen[$0]++')
# Combine maintainer & user list. Ignore words starting with # symbol, whitelines & duplicate entries
COMBINED_INSTALL_LIST=$(cat <(echo "$MAINTAINER_INSTALL_LIST") "$USER_INSTALL_LIST_FILE" | grep -v -E '^#|^$' | awk '!seen[$0]++')
COMBINED_REMOVE_LIST=$(cat <(echo "$MAINTAINER_REMOVE_LIST") "$USER_REMOVE_LIST_FILE" | grep -v -E '^#|^$' | awk '!seen[$0]++')
function notify-send-pre-install {
user_name=$(loginctl list-sessions --output=json | jq -r '.[].user')
@ -84,11 +104,11 @@ function notify-send-uninstall {
}
# Install flatpaks in list
if [[ -f $INSTALL_LIST_FILE ]]; then
if [[ -f $INSTALL_LIST_FILE ]] || [[ -f $USER_INSTALL_LIST_FILE ]]; then
if [[ -n $FLATPAK_LIST ]]; then
INSTALL_LIST=$(echo "$FLATPAK_LIST" | grep -vf - "$INSTALL_LIST_FILE")
INSTALL_LIST=$(comm -23 <(echo "$COMBINED_INSTALL_LIST" | sort) <(echo "$FLATPAK_LIST" | sort))
else
INSTALL_LIST=$(cat $INSTALL_LIST_FILE)
INSTALL_LIST="$COMBINED_INSTALL_LIST"
fi
if [[ -n $INSTALL_LIST ]] && [[ ! $NOTIFICATIONS == "true" ]]; then
flatpak install --system --noninteractive "$REPO_NAME" ${INSTALL_LIST[@]}
@ -100,8 +120,8 @@ if [[ -f $INSTALL_LIST_FILE ]]; then
fi
# Remove flatpaks in list
if [[ -f $REMOVE_LIST_FILE ]]; then
REMOVE_LIST=$(echo "$FLATPAK_LIST" | grep -o -f - "$REMOVE_LIST_FILE")
if [[ -f $REMOVE_LIST_FILE ]] || [[ -f $USER_REMOVE_LIST_FILE ]]; then
REMOVE_LIST=$(comm -12 <(echo "$COMBINED_REMOVE_LIST" | sort) <(echo "$FLATPAK_LIST" | sort))
if [[ -n $REMOVE_LIST ]] && [[ ! $NOTIFICATIONS == "true" ]]; then
flatpak uninstall --system --noninteractive ${REMOVE_LIST[@]}
elif [[ -n $REMOVE_LIST ]] && [[ $NOTIFICATIONS == "true" ]]; then

View file

@ -0,0 +1,6 @@
# This file can be used by the users for configuration of `notifications` used by the the `default-flatpaks` BlueBuild module.
# If this file is not modified, the image's default configuration will be used instead (located in /usr/share/bluebuild/default-flatpaks/notifications).
# Possible values: true, false
# Here's an example on how to edit this file (ignore # symbol):
#
# false

View file

@ -0,0 +1,10 @@
# This file can be used by the users for configuration of `system flatpaks install` used by the `default-flatpaks` BlueBuild module.
# If this file is not modified, the image's default configuration will be used instead (located in /usr/share/bluebuild/default-flatpaks/system/install).
# This list uses the Flatpak ID format, with one ID per line.
# Duplicated entries won't be used if located in the image's default configuration.
# Flatpak runtimes are not supported.
# Here's an example on how to edit this file (ignore # symbol):
#
# org.gnome.Maps
# org.gnome.TextEditor
# org.telegram.desktop

View file

@ -0,0 +1,10 @@
# This file can be used by the users for configuration for `system flatpaks removal` used by the `default-flatpaks` BlueBuild module.
# If this file is not modified, the image's default configuration will be used instead (located in /usr/share/bluebuild/default-flatpaks/system/remove).
# This list uses the Flatpak ID format, with one ID per line.
# Duplicated entries won't be used if located the image's default configuration.
# Flatpak runtimes are not supported.
# Here's an example on how to edit this file (ignore # symbol):
#
# org.gnome.Maps
# org.gnome.TextEditor
# org.telegram.desktop

View file

@ -0,0 +1,10 @@
# This file can be used by the users for configuration of configuration for `user flatpaks install` used by the `default-flatpaks` BlueBuild module.
# If this file is not modified, the image's default configuration will be used instead (located in /usr/share/bluebuild/default-flatpaks/user/install).
# This list uses the Flatpak ID format, with one ID per line.
# Duplicated entries won't be used if located in the image's default configuration.
# Flatpak runtimes are not supported.
# Here's an example on how to edit this file (ignore # symbol):
#
# org.gnome.Maps
# org.gnome.TextEditor
# org.telegram.desktop

View file

@ -0,0 +1,10 @@
# This file can be used by the users for configuration of `user flatpaks removal` used by the `default-flatpaks` BlueBuild module.
# If this file is not modified, the image's default configuration will be used instead (located in /usr/share/bluebuild/default-flatpaks/user/remove).
# This list uses the Flatpak ID format, with one ID per line.
# Duplicated entries won't be used if located in the image's default configuration.
# Flatpak runtimes are not supported.
# Here's an example on how to edit this file (ignore # symbol):
#
# org.gnome.Maps
# org.gnome.TextEditor
# org.telegram.desktop

View file

@ -6,7 +6,7 @@ if grep -qz 'fedora' <<< "$(flatpak remotes)"; then
flatpak remote-delete --user fedora-testing --force
fi
REPO_INFO="/etc/flatpak/user/repo-info.yml"
REPO_INFO="/usr/share/bluebuild/default-flatpaks/user/repo-info.yml"
REPO_URL=$(yq '.repo-url' $REPO_INFO)
REPO_NAME=$(yq '.repo-name' $REPO_INFO)
REPO_TITLE=$(yq '.repo-title' $REPO_INFO)
@ -24,21 +24,41 @@ if [[ ! $REPO_TITLE == "null" ]]; then
fi
# Notifications config
NOTIFICATIONS=$(cat /etc/flatpak/notifications)
NOTIFICATIONS_FILE="/usr/share/bluebuild/default-flatpaks/notifications"
USER_NOTIFICATIONS_FILE="/etc/bluebuild/default-flatpaks/notifications"
# Ignore words starting with # symbol, whitelines & duplicate entries for notifications config
MAINTAINER_NOTIFICATIONS=$(cat "$NOTIFICATIONS_FILE" | grep -v -E '^#|^$' | awk '!seen[$0]++')
USER_NOTIFICATIONS=$(cat "$USER_NOTIFICATIONS_FILE" | grep -v -E '^#|^$' | awk '!seen[$0]++')
# If user modified notifications config, utilize user's configuration, otherwise maintainer's
if [[ -n $USER_NOTIFICATIONS ]]; then
NOTIFICATIONS="$USER_NOTIFICATIONS"
else
NOTIFICATIONS="$MAINTAINER_NOTIFICATIONS"
fi
# Installed flatpaks
FLATPAK_LIST=$(flatpak list --user --columns=application)
# Flatpak list files
INSTALL_LIST_FILE="/etc/flatpak/user/install"
REMOVE_LIST_FILE="/etc/flatpak/user/remove"
INSTALL_LIST_FILE="/usr/share/bluebuild/default-flatpaks/user/install"
REMOVE_LIST_FILE="/usr/share/bluebuild/default-flatpaks/user/remove"
USER_INSTALL_LIST_FILE="/etc/bluebuild/default-flatpaks/user/install"
USER_REMOVE_LIST_FILE="/etc/bluebuild/default-flatpaks/user/remove"
# Prefer user's install + remove list over maintainer's, in case when same flatpak ID is present in maintainer's install list + user's remove list & vice-versa
# Also ignores words starting with # symbol, whitelines & duplicate entries
MAINTAINER_INSTALL_LIST=$(comm -23 <(sort "$INSTALL_LIST_FILE") <(sort "$USER_REMOVE_LIST_FILE") | grep -v -E '^#|^$' | awk '!seen[$0]++')
MAINTAINER_REMOVE_LIST=$(comm -23 <(sort "$REMOVE_LIST_FILE") <(sort "$USER_INSTALL_LIST_FILE") | grep -v -E '^#|^$' | awk '!seen[$0]++')
# Combine maintainer & user list. Ignore words starting with # symbol, whitelines & duplicate entries
COMBINED_INSTALL_LIST=$(cat <(echo "$MAINTAINER_INSTALL_LIST") "$USER_INSTALL_LIST_FILE" | grep -v -E '^#|^$' | awk '!seen[$0]++')
COMBINED_REMOVE_LIST=$(cat <(echo "$MAINTAINER_REMOVE_LIST") "$USER_REMOVE_LIST_FILE" | grep -v -E '^#|^$' | awk '!seen[$0]++')
# Install flatpaks in list
if [[ -f $INSTALL_LIST_FILE ]]; then
if [[ -f $INSTALL_LIST_FILE ]] || [[ -f $USER_INSTALL_LIST_FILE ]]; then
if [[ -n $FLATPAK_LIST ]]; then
INSTALL_LIST=$(echo "$FLATPAK_LIST" | grep -vf - "$INSTALL_LIST_FILE")
INSTALL_LIST=$(comm -23 <(echo "$COMBINED_INSTALL_LIST" | sort) <(echo "$FLATPAK_LIST" | sort))
else
INSTALL_LIST=$(cat $INSTALL_LIST_FILE)
INSTALL_LIST="$COMBINED_INSTALL_LIST"
fi
if [[ -n $INSTALL_LIST ]] && [[ ! $NOTIFICATIONS == "true" ]]; then
flatpak install --user --noninteractive "$REPO_NAME" ${INSTALL_LIST[@]}
@ -50,8 +70,8 @@ if [[ -f $INSTALL_LIST_FILE ]]; then
fi
# Remove flatpaks in list
if [[ -f $REMOVE_LIST_FILE ]]; then
REMOVE_LIST=$(echo "$FLATPAK_LIST" | grep -o -f - "$REMOVE_LIST_FILE")
if [[ -f $REMOVE_LIST_FILE ]] || [[ -f $USER_REMOVE_LIST_FILE ]]; then
REMOVE_LIST=$(comm -12 <(echo "$COMBINED_REMOVE_LIST" | sort) <(echo "$FLATPAK_LIST" | sort))
if [[ -n $REMOVE_LIST ]] && [[ ! $NOTIFICATIONS == "true" ]]; then
flatpak uninstall --user --noninteractive ${REMOVE_LIST[@]}
elif [[ -n $REMOVE_LIST ]] && [[ $NOTIFICATIONS == "true" ]]; then