loc_tools: Look also for locale(1) in /bin

That's where it is on z/OS
This commit is contained in:
Karl Williamson 2025-06-04 18:22:11 -06:00 committed by Karl Williamson
parent a6773db0d9
commit da43c74c00

View File

@ -568,8 +568,10 @@ sub find_locales ($;$) {
# Other subversive stuff.
delete local @ENV{qw(IFS CDPATH ENV BASH_ENV)};
if (-x "/usr/bin/locale"
&& open(LOCALES, '-|', "/usr/bin/locale -a 2>/dev/null"))
my $locale_cmd = "/usr/bin/locale";
$locale_cmd = "/bin/locale" unless -x $locale_cmd;
if ( -x $locale_cmd
&& open(LOCALES, '-|', "$locale_cmd -a 2>/dev/null"))
{
while (<LOCALES>) {