Module: tools Branch: master Commit: 11d12f958aa52c65e8c08971e5ba3cd7963a7559 URL: https://source.winehq.org/git/tools.git/?a=commit;h=11d12f958aa52c65e8c08971...
Author: Francois Gouget fgouget@codeweavers.com Date: Wed Jan 5 16:40:47 2022 +0100
testbot/SetwinLocale: Tweak the --country checks and conversion.
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
testbot/bin/SetWinLocale | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/testbot/bin/SetWinLocale b/testbot/bin/SetWinLocale index 521f0f9..2f72253 100755 --- a/testbot/bin/SetWinLocale +++ b/testbot/bin/SetWinLocale @@ -397,19 +397,19 @@ if (!defined $Usage) $OptLocale ||= $OptDefault; $OptSystem ||= $OptDefault; $OptMUI ||= $OptDefault; - if (!defined $OptCountry and defined $OptDefault and - $OptDefault =~ /-([A-Z]{2})$/) + + if (!$OptCountry and ($OptDefault || "") =~ /-([A-Z]{2})$/) { $OptCountry = $1; } - if (defined $OptCountry) + if ($OptCountry) { - if (!exists $Countries{$OptCountry}) + $CountryId = $Countries{$OptCountry}; + if (!defined $CountryId) { Error("unknown country '$OptCountry'\n"); $Usage = 2; } - $CountryId = $Countries{$OptCountry}; }
if (!$OptLocale and !$OptSystem and !$OptMUI and !$OptKeyboard and