Preserve Plymouth theme directory permissions

This commit is contained in:
David Heinemeier Hansson
2026-07-29 19:45:43 -07:00
parent 57ea0b4cd0
commit 695614ce6a
2 changed files with 26 additions and 1 deletions
+25
View File
@@ -0,0 +1,25 @@
#!/bin/bash
source "$(dirname "${BASH_SOURCE[0]}")/base-test.sh"
test_tmp=$(mktemp -d)
trap 'rm -rf "$test_tmp"' EXIT
source_dir="$test_tmp/source"
theme_dir="$test_tmp/theme"
mkdir -m 0700 "$source_dir"
mkdir -m 0755 "$theme_dir"
touch "$source_dir/logo.png"
cp -a --no-preserve=mode,ownership "$source_dir/." "$theme_dir/"
[[ $(stat -c %a "$theme_dir") == "755" ]] ||
fail "Plymouth asset copy preserves the theme directory permissions"
grep -Fq \
'cp -a --no-preserve=mode,ownership "$staging_dir/." "$theme_dir/"' \
"$ROOT/bin/omarchy-plymouth-set" ||
fail "omarchy-plymouth-set avoids copying staging directory ownership and mode"
pass "Plymouth asset copy preserves the package-owned directory metadata"