From shell (both locally from zsh on Mac and bash on redhat-7) this works correctly, creating LC_MESSAGE dirs and corresponding MO files:
for dir in ./locales/*/ ; do [ -d "${dir}/LC_MESSAGES" ] || mkdir "${dir}/LC_MESSAGES" ; msgfmt "${dir}/puppet.po" -o "${dir}/LC_MESSAGES/puppet.mo" ; done ;
But when run from the vanagon configure step in these lines: https://github.com/Magisus/puppet-agent/blob/mo-generation/configs/components/puppet.rb#L101-L103,
it the ${dir}
is empty:
[ -d puppet ] || mkdir -p puppet
cd puppet && \
: && \
for dir in ./locales/*/ ; do [ -d "/LC_MESSAGES" ] || mkdir "/LC_MESSAGES" ; msgfmt "/puppet.po" -o "/LC_MESSAGES/puppet.mo" ; done ;
msgfmt: error while opening "/puppet.po" for reading: No such file or directory
msgfmt: error while opening "/puppet.po" for reading: No such file or directory