38 |
|
|
39 |
select_locale() |
select_locale() |
40 |
{ |
{ |
41 |
local items=( $(localedef --list-archive | grep $(${INSTALLER_DIR}/include/timezone.sh --get-code ${TIMEZONE_LOCATION})) ) |
local items |
42 |
local count=${#items[*]} |
local count |
43 |
local i |
local i |
44 |
|
local retval |
45 |
|
|
46 |
dialog \ |
if [[ -z $(localedef --list-archive) ]] |
47 |
--stdout \ |
then |
48 |
--colors \ |
echo "Error: No locales found on this system!" |
49 |
--backtitle "${TITLE}" \ |
retval=255 |
50 |
--menu "Select a default locale" \ |
else |
51 |
0 0 ${count} \ |
items=( $(localedef --list-archive | grep $(${INSTALLER_DIR}/include/timezone.sh --get-code ${TIMEZONE_LOCATION})) ) |
52 |
$(for (( i=0; i<count; i++ )); do echo "${items[$i]} ."; done) |
count=${#items[*]} |
53 |
|
|
54 |
return $? |
dialog \ |
55 |
|
--stdout \ |
56 |
|
--colors \ |
57 |
|
--backtitle "${TITLE}" \ |
58 |
|
--menu "Select a default locale" \ |
59 |
|
0 0 ${count} \ |
60 |
|
$(for (( i=0; i<count; i++ )); do echo "${items[$i]} ."; done) |
61 |
|
retval=$? |
62 |
|
fi |
63 |
|
|
64 |
|
return ${retval} |
65 |
} |
} |
66 |
|
|
67 |
rundialog_select_timezone_region() |
rundialog_select_timezone_region() |