Adjust user/group ownership post-build.

This commit is contained in:
Cyril Brulebois 2024-07-23 13:22:39 +02:00
parent 6408e062b2
commit 72f6646fb5

View File

@ -91,5 +91,12 @@ zerofree "/dev/mapper/${loop}p2"
kpartx -dsv "$out"
rmdir "$MNT"
# Adjust metadata: instead of leaving generated files owned by root:root, use
# the current directory's uid and gid.
echo "🍞 Adjusting metadata"
uid=$(stat -c '%u' .)
gid=$(stat -c '%u' .)
chown "$uid:$gid" "$out"
echo "🍞 Toasted!"
echo " → $out"