diff options
author | 2020-07-27 18:37:43 +0300 | |
---|---|---|
committer | 2020-07-27 18:37:43 +0300 | |
commit | 05bbf16bcf7c9cc690324182f411d98dddbae7c6 (patch) | |
tree | d5ea6272dacd0dca63ac6e9afc54c0ec48e3f063 | |
parent | Further logic improvements (diff) | |
download | locale-gen-05bbf16bcf7c9cc690324182f411d98dddbae7c6.tar.gz locale-gen-05bbf16bcf7c9cc690324182f411d98dddbae7c6.tar.bz2 locale-gen-05bbf16bcf7c9cc690324182f411d98dddbae7c6.zip |
Fix error message if no locales are to be addedlocale-gen-2.10
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
-rwxr-xr-x | locale-gen | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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 |