HomeFreeBSD

locale: tools: Make finalize idempotent

Description

locale: tools: Make finalize idempotent

The finalize script renames source files with 3 components in their name
into names with two components with an @modifier, in the process.

Running the script for a second time without cleaning will strip the
@modifier from the files, producing invalid Makefiles and unusable
locales.

Prevent this by adding a guard at the beginning of the script.

Also, use a sub-shell for directory changes to avoid working directory
issues.

Reviewed by: bapt
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D53981

(cherry picked from commit 934364da7fc8cd3ba4d030d0478163b41dda1b37)

Details

Provenance
jlduranAuthored on Dec 6 2025, 12:20 PM
Reviewer
bapt
Differential Revision
D53981: locale: tools: Make finalize idempotent
Parents
rGbd37a9b1282c: locale: make install
Branches
Unknown
Tags
Unknown