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

Commit

Permalink
fix: faster installation of custom RPMs
Browse files Browse the repository at this point in the history
Thanks to leveraging Bash arrays, we are now able to use parameter expansion to perform every package installation as one rpm-ostree operation instead of individual ones. This will give us a huge build speedup.

Bash properly expands every array element as safely quoted arguments, complete with support for spaces and special characters.
  • Loading branch information
Arcitec authored and xynydev committed May 10, 2023
1 parent 07cbe2c commit 5f072b8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@ rpm-ostree override remove firefox firefox-langpacks
get_yaml_array install_rpms '.rpms[]'
if [[ ${#install_rpms[@]} -gt 0 ]]; then
echo "-- Installing RPMs defined in recipe.yml --"
for pkg in "${install_rpms[@]}"; do
echo "Installing: ${pkg}"
rpm-ostree install $pkg
done
echo "Installing: ${install_rpms[@]}"
rpm-ostree install "${install_rpms[@]}"
echo "---"
fi

Expand Down

0 comments on commit 5f072b8

Please sign in to comment.