Skip to content
This repository has been archived by the owner on Nov 23, 2023. It is now read-only.

Commit

Permalink
chore: don't use _STR like array
Browse files Browse the repository at this point in the history
  • Loading branch information
xynydev committed Sep 9, 2023
1 parent c10f7e7 commit 311dfe2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/rpm-ostree/rpm-ostree.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ if [[ ${#INSTALL[@]} -gt 0 && ${#REMOVE[@]} -gt 0 ]]; then
echo "Installing: ${INSTALL_STR[*]}"
echo "Removing: ${REMOVE_STR[*]}"
# Doing both actions in one command allows for replacing required packages with alternatives
rpm-ostree override remove ${REMOVE_STR[@]} $(printf -- "--install=%s " ${INSTALL_STR[@]})
rpm-ostree override remove $REMOVE_STR $(printf -- "--install=%s " $INSTALL_STR)
elif [[ ${#INSTALL[@]} -gt 0 ]]; then
echo "Installing RPMs"
echo "Installing: ${INSTALL_STR[*]}"
rpm-ostree install ${INSTALL_STR[@]}
rpm-ostree install $INSTALL_STR
elif [[ ${#INSTALL[@]} -gt 0 ]]; then
echo "Removing RPMs"
echo "Removing: ${REMOVE_STR[*]}"
rpm-ostree override remove ${REMOVE_STR[@]}
rpm-ostree override remove $REMOVE_STR
fi

0 comments on commit 311dfe2

Please sign in to comment.