summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2020-07-27 18:37:43 +0300
committerAndreas K. Hüttel <dilfridge@gentoo.org>2020-07-27 18:37:43 +0300
commit05bbf16bcf7c9cc690324182f411d98dddbae7c6 (patch)
treed5ea6272dacd0dca63ac6e9afc54c0ec48e3f063
parentFurther logic improvements (diff)
downloadlocale-gen-master.tar.gz
locale-gen-master.tar.bz2
locale-gen-master.zip
Fix error message if no locales are to be addedHEADlocale-gen-2.10master
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
-rwxr-xr-xlocale-gen7
1 files changed, 5 insertions, 2 deletions
diff --git a/locale-gen b/locale-gen
index 93616b3..f0dc40e 100755
--- a/locale-gen
+++ b/locale-gen
@@ -376,12 +376,13 @@ ret=$(( 0 ${JOB_RETS[@]/#/+} ))
einfo "Generation complete"
if ${LOCALE_ARCHIVE} && [[ -z ${JUST_LIST} ]] ; then
- if true ; then # need to check that at least one locale has to be added
+ # need to check that at least one locale has to be added
+ if [[ $(echo "${LOCALEDIR}"/*/) != "${LOCALEDIR}"'/*/' ]] ; then
ebegin "Adding locales to archive"
# The pattern ends with / on purpose: we don't care about files (like
# locale-archive) in the locale subdir, and we definitely don't want to
# delete them!
- for LOC in "${LOCALEDIR}"/*/; do
+ for LOC in "${LOCALEDIR}"/*/; do
LOC=${LOC%/} # Strip trailing /, since localedef doesn't like it
x=$(
# In most cases, localedef can just use the system glibc.
@@ -415,6 +416,8 @@ if ${LOCALE_ARCHIVE} && [[ -z ${JUST_LIST} ]] ; then
)
done
eend $ret
+ else
+ einfo "No locales are to be added to the archive."
fi
fi