mirror of
https://github.com/optim-enterprises-bv/secureblue.git
synced 2025-11-04 12:28:04 +00:00
chore: back to array syntax in rpm-ostree
This commit is contained in:
@@ -15,21 +15,18 @@ fi
|
|||||||
get_yaml_array INSTALL '.install[]' "$1"
|
get_yaml_array INSTALL '.install[]' "$1"
|
||||||
get_yaml_array REMOVE '.remove[]' "$1"
|
get_yaml_array REMOVE '.remove[]' "$1"
|
||||||
|
|
||||||
INSTALL_STR=$(echo "${INSTALL[*]}" | tr -d '\n')
|
|
||||||
REMOVE_STR=$(echo "${REMOVE[*]}" | tr -d '\n')
|
|
||||||
|
|
||||||
if [[ ${#INSTALL[@]} -gt 0 && ${#REMOVE[@]} -gt 0 ]]; then
|
if [[ ${#INSTALL[@]} -gt 0 && ${#REMOVE[@]} -gt 0 ]]; then
|
||||||
echo "Installing & Removing RPMs"
|
echo "Installing & Removing RPMs"
|
||||||
echo "Installing: ${INSTALL_STR[*]}"
|
echo "Installing: $(echo "${INSTALL[*]}" | tr -d '\n')"
|
||||||
echo "Removing: ${REMOVE_STR[*]}"
|
echo "Removing: $(echo "${REMOVE[*]}" | tr -d '\n')"
|
||||||
# Doing both actions in one command allows for replacing required packages with alternatives
|
# 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[@]}" $(printf -- "--install=%s " ${INSTALL[@]})
|
||||||
elif [[ ${#INSTALL[@]} -gt 0 ]]; then
|
elif [[ ${#INSTALL[@]} -gt 0 ]]; then
|
||||||
echo "Installing RPMs"
|
echo "Installing RPMs"
|
||||||
echo "Installing: ${INSTALL_STR[*]}"
|
echo "Installing: $(echo "${INSTALL[*]}" | tr -d '\n')"
|
||||||
rpm-ostree install ${INSTALL_STR[@]}
|
rpm-ostree install "${INSTALL[@]}"
|
||||||
elif [[ ${#INSTALL[@]} -gt 0 ]]; then
|
elif [[ ${#INSTALL[@]} -gt 0 ]]; then
|
||||||
echo "Removing RPMs"
|
echo "Removing RPMs"
|
||||||
echo "Removing: ${REMOVE_STR[*]}"
|
echo "Removing: $(echo "${REMOVE[*]}" | tr -d '\n')"
|
||||||
rpm-ostree override remove ${REMOVE_STR[@]}
|
rpm-ostree override remove "${REMOVE[@]}"
|
||||||
fi
|
fi
|
||||||
Reference in New Issue
Block a user