diff options
| author | Craig Jennings <c@cjennings.net> | 2026-07-20 15:56:26 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-07-20 15:56:26 -0500 |
| commit | a29769e0f46aa2e2b9ed3662d58d1395a665b5d5 (patch) | |
| tree | 72fb0a30c5c9207ebfc395b7886c223e0038da47 /scripts/testing/run-test-baremetal.sh | |
| parent | 44ccab18d624d3f5b7acbe65f4ad5616247aad00 (diff) | |
| download | archsetup-a29769e0f46aa2e2b9ed3662d58d1395a665b5d5.tar.gz archsetup-a29769e0f46aa2e2b9ed3662d58d1395a665b5d5.zip | |
fix(sounds): make normalize-notify-sounds write atomically and clean up
The script re-encoded each notify sound with `cat "$tmp" > "$f"`, which truncates the target first -- a short or empty encode left a corrupt, repo-tracked sound file. The mktemp also had no trap, so an interrupted encode leaked a temp.
Now it resolves the real target with `readlink -f` (SOUND_DIR is usually the stow-symlinked ~/.local copy), stages the temp beside it, guards on a non-empty encode, and moves it into place. The mv is atomic on one filesystem and replaces the real file, so the stow symlink still points at it. An EXIT trap removes the in-flight temp when a failed encode aborts the run.
Diffstat (limited to 'scripts/testing/run-test-baremetal.sh')
0 files changed, 0 insertions, 0 deletions
