Improve grep in ostree config-diff to not choke on spaces in filenames

This commit is contained in:
Salt 2024-06-10 22:54:03 -05:00
parent b54710a72e
commit b37f882d7d

View File

@ -39,8 +39,7 @@ DIRS+=("{{ item }}")
if command -v ostree > /dev/null 2>&1; then if command -v ostree > /dev/null 2>&1; then
for file in $( for file in $(
ostree admin config-diff 2>/dev/null | \ ostree admin config-diff 2>/dev/null | \
grep -e '^[A|M]' | \ grep -oP '^[A|M]\s*\K.*'
awk '{print $2}'
); do ); do
DIRS+=("/etc/$file") DIRS+=("/etc/$file")
done done